.net 5 web assembly deploy issues

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
the entire radzen tool has crashes during this process.

Here is one example of a crash i captured during this

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

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.

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.

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?

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

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
    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: 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.

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.


1 Like

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 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.

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 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.

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".

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.

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.

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".

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

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


versus how VS 2019 is setup?


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.

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..

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.

Hi @cglick,

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

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 in some cases. However this configuration sections seems to be locked in your IIS installation for some unknown to us reason hence the exception.

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?

I tried removing web dav and that made it work.

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.