'Blazor webassembly (net5.0) publish not worked in IIS
I have created a Blazor webassambly net5 project with Identity Server (asp.net core hosted, PWA checked). Project run fine development in Visual Studio and done publish with it. Publish file is in ProjectName/Server/bin/release/net5.0/publish.
I followed the steps to host on IIS as,
- From windows features, enabled IIS features (show in image)
- Restarted the windows
- Asp net core hosting bundle 5.0.7 downloaded and installed
- Restarted the windows
- added site on IIS, pointing to the publish folder , "ProjectName/Server/bin/release/net5.0/publish", and Port 801
- In application pool, .NET CLR Version is set to 'No Managed Code'
- But the site is not working, and the message is
This page isn’t working right now localhost can't currently handle this request. HTTP ERROR 500
.
Here I have attached some images I have done,
IIS setup and Program Features
and the result, while browse the site
I have tried some other answers/result from search but not success. Please help.
Solution 1:[1]
You should use Blazor Team its suggested Web.config
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Dennis van der Stelt |