i have build a Blazor-Server-App (ASP.NET Core hosted) and published it from Visual Studio to a local folder. It worked fine.
Now i want to publish it on my windows server. It successfully runs some ASP.NET web APIs, so basically its working. It has an own domain.
What i did now is copying the local folder to the server and opening IIS Manager. I added a website and set the path to the folder.
But now, when i click on "Application Setting" i get an error regarding the web.config, see Screenshot.
I would appreciate any hints on why the web.config Visual Studio created does not work with my IIS.
Regards, Tim
Blazor WebAssembly apps can be deployed to Azure App Services on Windows, which hosts the app on IIS.
Blazor apps can be hosted in one of the following ways: Client-side in the browser on WebAssembly. Server-side in an ASP.NET Core app.
to publish blazor app in iis first make sure you installed below iis feature:
Download and Install the Runtime and Hosting bundle as per your version.
https://dotnet.microsoft.com/download/dotnet-core/3.1
after installing hosting bundles do not forget to restart the machine. if you installed a hosting bundle bore installing iis you need to repair it.
now Open blazor application in Visual Studio, right-click on a project from solution explorer and select “Publish..” option.
Click on Publish > Start > Folder > choose a folder path and click on the “Create Profile” button.
Click on the “Publish” button.
Now, Open IIS.
Right Click on “SItes” > “Add Website…”.
Set all details like “Site Name”, “Physical path”, “IP address” etc, and click on the “OK” button.
Done!, now right-click on Browse and you can see your hosted application inside the browser.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With