# .net 5 web assembly deploy issues

**URL:** <https://forum.radzen.com/t/net-5-web-assembly-deploy-issues/5662>\
**Category:** Blazor WebAssembly\
**Created:** [November 17, 2020, 9:15pm UTC](https://forum.radzen.com/t/net-5-web-assembly-deploy-issues/5662 "2020-11-17T21:15:17Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![cglick](https://forum.radzen.com/user_avatar/forum.radzen.com/cglick/32/4687_2.png) [@cglick](https://forum.radzen.com/u/cglick)\
**Post date:** [November 17, 2020, 9:15pm UTC](https://forum.radzen.com/t/net-5-web-assembly-deploy-issues/5662/1 "2020-11-17T21:15:17Z")

</div>

to be fair, i have not tested this across the different versions, this is currently only related to .net 5 and web assembly.

there appear to be deployment issues when not using "localhost" and using "localhost" but attempting to access machine remotely doesn't work, so when publishing to localhost for testing, only i can test from my computer, and no remote allowed as it breaks.(probably related to ssl)

one issue is that if i publish as "localhost" and then attempt to access the site via the name of the server, instead of localhost, it fails with many many errors., that's okay, just need to know this is expected?

and second issue revolves around publishing with the name of my server vs "localhost".  
when using name other than "locahost" radzen then requires credentials, i put in my domain credentials. attempt to publish, and the process ends up with either "unable to connect" error  
or  
the entire radzen tool has crashes during this process.

Here is one example of a crash i captured during this

 ![image](https://forum.radzen.com/uploads/default/original/2X/b/ba45ca0e2020a8744130d25971480b4f4d0a4a92.png)

this is an FYI to help you find potential issues with this process.  
Thanks.

---

<div class="post-metadata">

**Author:** ![cglick](https://forum.radzen.com/user_avatar/forum.radzen.com/cglick/32/4687_2.png) [@cglick](https://forum.radzen.com/u/cglick)\
**Post date:** [November 17, 2020, 9:54pm UTC](https://forum.radzen.com/t/net-5-web-assembly-deploy-issues/5662/2 "2020-11-17T21:54:06Z")

</div>

tested using blazor server app .net 5 publish to remote iis without issue.

New update:

i tested publishing using radzen for .net 5 wasm app to localhost and it works.  
i tested publishing using radzen for .net 5 wasm app to remote iis and it succeeds in publish, but the site does not function.

---

<div class="post-metadata">

**Author:** ![enchev](https://forum.radzen.com/user_avatar/forum.radzen.com/enchev/32/16_2.png) [@enchev](https://forum.radzen.com/u/enchev)\
**Post date:** [November 18, 2020, 5:23am UTC](https://forum.radzen.com/t/net-5-web-assembly-deploy-issues/5662/3 "2020-11-18T05:23:12Z")

</div>

The deploy function of Radzen will build and copy the application to IIS - the server configuration is at your premise. Check what's the difference between your local IIS where the application works.

---

<div class="post-metadata">

**Author:** ![cglick](https://forum.radzen.com/user_avatar/forum.radzen.com/cglick/32/4687_2.png) [@cglick](https://forum.radzen.com/u/cglick)\
**Post date:** [November 18, 2020, 4:26pm UTC](https://forum.radzen.com/t/net-5-web-assembly-deploy-issues/5662/4 "2020-11-18T16:26:29Z")

</div>

If i can publish to a site a blazor server .net 5 app to a site on a server.successfully and then turn around  
and attempt to publish a blazor web assembly to the same site on the same server?

that is the point of my last post. if one works , then the other should right?

---

<div class="post-metadata">

**Author:** ![enchev](https://forum.radzen.com/user_avatar/forum.radzen.com/enchev/32/16_2.png) [@enchev](https://forum.radzen.com/u/enchev)\
**Post date:** [November 18, 2020, 4:35pm UTC](https://forum.radzen.com/t/net-5-web-assembly-deploy-issues/5662/5 "2020-11-18T16:35:52Z")

</div>

Is your WebAssembly app working normally when deployed to local IIS? If this is the case, check the difference between local and remote server.

---

<div class="post-metadata">

**Author:** ![cglick](https://forum.radzen.com/user_avatar/forum.radzen.com/cglick/32/4687_2.png) [@cglick](https://forum.radzen.com/u/cglick)\
**Post date:** [November 18, 2020, 10:04pm UTC](https://forum.radzen.com/t/net-5-web-assembly-deploy-issues/5662/6 "2020-11-18T22:04:14Z")

</div>

i can publish to my local iis using "localhost" and that succeeds.

there are two other types of publishing that create issues.

other two issues

1. publish to same local host using name of my computer that is the localhost, i get exception  
msdeploy: Error Code: ERROR\_DESTINATION\_NOT\_REACHABLE  
More Information: Could not connect to the remote computer ("xxxxxxxxx"). On the remote computer, make sure that Web Deploy is installed and that the required process ("Web Deployment Agent Service") is started. Learn more at: [Web Deploy error codes - Internet Information Services | Microsoft Learn](https://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE).

this is the same site that worked with localhost, why would it tell me it's rejecting the site, if i just published using localhost?

1. the second related issue with publishing...is that if i then publish this site to an actual remote server. this publish does not fail, but i get the same type of errors when i run the site.  
see those errors below...

these are related but different type of issues.

## 500 - Internal server error.

### There is a problem with the resource you are looking for, and it cannot be displayed.

 ![image](https://forum.radzen.com/uploads/default/original/2X/d/df439cd162913af6c01119b5a8857d49e675e08a.png)

---

<div class="post-metadata">

**Author:** ![cglick](https://forum.radzen.com/user_avatar/forum.radzen.com/cglick/32/4687_2.png) [@cglick](https://forum.radzen.com/u/cglick)\
**Post date:** [November 18, 2020, 10:23pm UTC](https://forum.radzen.com/t/net-5-web-assembly-deploy-issues/5662/7 "2020-11-18T22:23:41Z")

</div>

i'm sorry to waste your time on this subject.

At this point, I will accept that this some learning opportunity for me and has nothing to do with Radzen.

Thanks.

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [November 19, 2020, 8:44am UTC](https://forum.radzen.com/t/net-5-web-assembly-deploy-issues/5662/8 "2020-11-19T08:44:25Z")

</div>

> [@cglick](#):
>
> publish to same local host using name of my computer that is the localhost, i get exception  
> msdeploy: Error Code: ERROR\_DESTINATION\_NOT\_REACHABLE  
> More Information: Could not connect to the remote computer ("xxxxxxxxx"). On the remote computer, make sure that Web Deploy is installed and that the required process ("Web Deployment Agent Service") is started. Learn more at: [Web Deploy error codes - Internet Information Services | Microsoft Learn](https://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE).

Radzen uses msdeploy to deploy to IIS (there is no other way around that). Apparently msdeploy treats localhost differently - probably skips the web deployment agent service completely because it can just copy the files as they are on the same physical system. I found the following [link](https://stackoverflow.com/questions/58322648/error-destination-not-reachable-error-when-trying-to-deploy-to-google-cloud-p) while searching for this error message (there are a lot of hits). I suggest trying to deploy the application from Visual Studio to see if that works works. If there is an issue with the msdeploy installation then Visual Studio will fail too.

> [@cglick](#):
>
> ## 500 - Internal server error.
> 
> ### There is a problem with the resource you are looking for, and it cannot be displayed.

HTTP error 500 means that a server-side exception happened. This is almost good news as it means your application is probably running (so .NET Core started etc.). We now have to find what the exception is - normally there should be [log files](https://www.radzen.com/documentation/troubleshooting/#iis) in the deployed application directory. Check if those files exist and what their content is.

Lastly you can run the application on your server from command line. Go to `%SYSTEMDRIVE%\inetpub\wwwroot\[APPLICATION_NAME]\` on your remote server and execute `dotnet [applicationname].dll`. It should start without issue and you should be able to browse it at `http://localhost:5000`.

---

<div class="post-metadata">

**Author:** ![cglick](https://forum.radzen.com/user_avatar/forum.radzen.com/cglick/32/4687_2.png) [@cglick](https://forum.radzen.com/u/cglick)\
**Post date:** [November 20, 2020, 10:23pm UTC](https://forum.radzen.com/t/net-5-web-assembly-deploy-issues/5662/9 "2020-11-20T22:23:48Z")

</div>

i created a visual studio project using template for .net 5 web assembly.  
published to remote site with success and running.

NOTE: before i publish, i go into sites and clear all files. and restart site before publishing another site to insure that there is no issue with existence of files, that is reserved for other testing.

Using Radzen i create .net 5 web assembly and publish to the same site for which i just published from Visual studio that functioned, and it succeeds in publish but has when i attempt to open site.

when i access the site remotely i only get error on site similar to errors i have sent prior.  
but when accessing locally on the iis server that is remote, i get a different error. see next pic.

the error text i see is...

IIS 10.0 Detailed Error - 500.19 - Internal Server Error

This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".

 ![image](https://forum.radzen.com/uploads/default/original/2X/1/1f4d32e53e5960ca34103707dba18eeb5797c89b.png)

for comparison purposes...here is a comparison of the two web.configs  
these are both web assembly configs one from radzen on bottom and the vs 2019 .net 5 blazor web assembly template site config on top.

 ![image](https://forum.radzen.com/uploads/default/original/2X/4/434e9a77a16fbd4c93657a0d7d464e41847fd53b.png)

---

<div class="post-metadata">

**Author:** ![cglick](https://forum.radzen.com/user_avatar/forum.radzen.com/cglick/32/4687_2.png) [@cglick](https://forum.radzen.com/u/cglick)\
**Post date:** [November 20, 2020, 10:32pm UTC](https://forum.radzen.com/t/net-5-web-assembly-deploy-issues/5662/10 "2020-11-20T22:32:34Z")

</div>

in Radzen you can choose between web deploy or web management service.  
Strangely...look at this screenshot of the VS 2019 publish settings  
i am using web deploy, but notice it says MsDeployPublishMethod is WMSVC so it seems wierd in that.  
within Radzen you choose one or the other, can you explain why that is?

i would also like to point out that within the visual studio publish feature, i always choose win-64.  
But within Radzen i do not know if i can change that?  
Also , if i choose the defaults when publishing within VS 2019 it fails, i must change to win-64 which i guess is called the Runtime Identifier.

i went ahead and attempted to publish the Radzen project using VS 2019 using same options you see here and got the same results when opening site, it talks about a malformed config.

 ![image](https://forum.radzen.com/uploads/default/original/2X/4/4972b05e1668bce65aa929c1926c7b70fa07b596.png)

---

<div class="post-metadata">

**Author:** ![cglick](https://forum.radzen.com/user_avatar/forum.radzen.com/cglick/32/4687_2.png) [@cglick](https://forum.radzen.com/u/cglick)\
**Post date:** [November 20, 2020, 10:44pm UTC](https://forum.radzen.com/t/net-5-web-assembly-deploy-issues/5662/11 "2020-11-20T22:44:39Z")

</div>

here is the error from when i publish the radzen site using vs 2019...

IIS 10.0 Detailed Error - 500.19 - Internal Server Error

This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".

---

<div class="post-metadata">

**Author:** ![cglick](https://forum.radzen.com/user_avatar/forum.radzen.com/cglick/32/4687_2.png) [@cglick](https://forum.radzen.com/u/cglick)\
**Post date:** [November 20, 2020, 10:46pm UTC](https://forum.radzen.com/t/net-5-web-assembly-deploy-issues/5662/12 "2020-11-20T22:46:31Z")

</div>

my best guess at what is wrong...process path?

maybe it needs to be specific like in the working vs 2019 template?

![image](https://forum.radzen.com/uploads/default/original/2X/5/5099d4cabc27c4cdfb20ea665508d23c88987294.png)

versus how VS 2019 is setup?

![image](https://forum.radzen.com/uploads/default/original/2X/1/1d287d6f8bed8109ceea04f2cf276b6f632f616e.png)

---

<div class="post-metadata">

**Author:** ![cglick](https://forum.radzen.com/user_avatar/forum.radzen.com/cglick/32/4687_2.png) [@cglick](https://forum.radzen.com/u/cglick)\
**Post date:** [November 20, 2020, 10:56pm UTC](https://forum.radzen.com/t/net-5-web-assembly-deploy-issues/5662/13 "2020-11-20T22:56:40Z")

</div>

I attempted a number of different configurations using VS 2019 deploy with the Radzen site without success.

following is another set of options that published, but got the same error as earlier.

 ![image](https://forum.radzen.com/uploads/default/original/2X/e/ee7728fd46baeee14fecf218a482470a69e6e285.png)

---

<div class="post-metadata">

**Author:** ![cglick](https://forum.radzen.com/user_avatar/forum.radzen.com/cglick/32/4687_2.png) [@cglick](https://forum.radzen.com/u/cglick)\
**Post date:** [November 20, 2020, 11:05pm UTC](https://forum.radzen.com/t/net-5-web-assembly-deploy-issues/5662/14 "2020-11-20T23:05:16Z")

</div>

as another test i also removed WEB DAV from my remote IIS server thinking that might be creating an issue. considering the error at hand...and did more testing publishing without web dav on remote server and got same result.

Can you show the default settings i should be using on my remote site that would best support a radzen web assembly app from Radzen?

Here are my settings..

 ![image](https://forum.radzen.com/uploads/default/original/2X/4/41dceeef77b449ef8b4c06be5ab949496457df41.png)

---

<div class="post-metadata">

**Author:** ![cglick](https://forum.radzen.com/user_avatar/forum.radzen.com/cglick/32/4687_2.png) [@cglick](https://forum.radzen.com/u/cglick)\
**Post date:** [November 20, 2020, 11:12pm UTC](https://forum.radzen.com/t/net-5-web-assembly-deploy-issues/5662/15 "2020-11-20T23:12:29Z")

</div>

when i attempt to run the radzen site from within VS 2019...  
THE SITE is functional within Radzen and VS 2019.  
I just can't seem to publish it in any way shape or form.

Thanks for your time with this issue.  
I am done with this round of troubleshooting.

 ![image](https://forum.radzen.com/uploads/default/original/2X/c/c35bea8e75cfec3478b04d7fdaad7e42d1cfc016.png)

---

<div class="post-metadata">

**Author:** ![enchev](https://forum.radzen.com/user_avatar/forum.radzen.com/enchev/32/16_2.png) [@enchev](https://forum.radzen.com/u/enchev)\
**Post date:** [November 21, 2020, 12:18am UTC](https://forum.radzen.com/t/net-5-web-assembly-deploy-issues/5662/16 "2020-11-21T00:18:57Z")

</div>

Hi @cglick,

You can use also Deploy to ZIP and extract the content in your remote IIS.

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [November 21, 2020, 7:10am UTC](https://forum.radzen.com/t/net-5-web-assembly-deploy-issues/5662/17 "2020-11-21T07:10:22Z")

</div>

Can you try the following:

1. Open the Radzen app in VS2019.
2. Edit the web.config and remove the `<modules><remove name="WebDAVModule" /></modules>` lines (or just overwrite the web.config with the one from the working application).
3. Try to deploy from VS2019 and see if the application works.

If this works you may try adding the web.config file to Radzen's code generation ignore list and using your own version. Then Radzen' shouldn't generate it and put the WebDavModule code. This should allow successful deploys from Radzen.

That WebDAVModule code is required since [WebDAV breaks ASP.NET Core applications](https://stackoverflow.com/questions/48188895/asp-net-core-with-iis-http-verb-not-allowed) in some cases. However this configuration sections seems to be locked in your IIS installation for some unknown to us reason hence the exception.

---

<div class="post-metadata">

**Author:** ![cglick](https://forum.radzen.com/user_avatar/forum.radzen.com/cglick/32/4687_2.png) [@cglick](https://forum.radzen.com/u/cglick)\
**Post date:** [November 23, 2020, 4:40pm UTC](https://forum.radzen.com/t/net-5-web-assembly-deploy-issues/5662/18 "2020-11-23T16:40:22Z")

</div>

i tried that and it was able to successfully publish.

i uninstalled WebDAV on my IIS thinking it was related.  
So if it's not on the IIS not sure why it's "locked in my IIS installation" as you commented?

---

<div class="post-metadata">

**Author:** ![cglick](https://forum.radzen.com/user_avatar/forum.radzen.com/cglick/32/4687_2.png) [@cglick](https://forum.radzen.com/u/cglick)\
**Post date:** [November 23, 2020, 4:41pm UTC](https://forum.radzen.com/t/net-5-web-assembly-deploy-issues/5662/19 "2020-11-23T16:41:08Z")

</div>

I tried removing web dav and that made it work.

---

<div class="post-metadata">

**Author:** ![cglick](https://forum.radzen.com/user_avatar/forum.radzen.com/cglick/32/4687_2.png) [@cglick](https://forum.radzen.com/u/cglick)\
**Post date:** [November 23, 2020, 4:47pm UTC](https://forum.radzen.com/t/net-5-web-assembly-deploy-issues/5662/20 "2020-11-23T16:47:52Z")

</div>

as another test i will remove webdav from my dev machine..and create a new site and see if web dav gets in the way. Thanks.

 ![image](https://forum.radzen.com/uploads/default/original/2X/8/8bec06b706ae25b4b6fa1d4723c5aadc9444ab3f.png)

[Next page](https://forum.radzen.com/t/net-5-web-assembly-deploy-issues/5662.md?page=2)
