I'm trying to publish a Blazor WebAssembly App, targeting .NET 5.0. I created a new Web Deploy publish profile from Visual Studio 2019, using the default settings:
The site is published to IIS, but the browser is displaying a 500.19 - Internal Server Error: "The requested page cannot be accessed because the related configuration data for the page is invalid."
There's a strange path for web.config, which is starting with "\\?\":
\\?\C:\inetpub\wwwroot\__ClientBlazor\web.config
I've tried any of the suggestions I've found on similar threads, but none of them solve the problem. Could it be a specific bug of VS publish wizard on Blazor projects?
Turns out that it was an url-rewrite problem, which is addressed by this IIS Url Rewrite extension. Simply install the extension and the republish the app, it will work.
BUT other errors will then be raised, like the following: 404 on every css and javascript resources (see this and that for further details and a really weird solution).