Introduction
In this article, We will deploy a Blazor application in IIS on a Windows OS. To deploy blazor application I will use Visual Studio 2019.
Prerequisites
- Pre Installed IIS server.
- Visual studio 2019.
- .NET Core hosting bundle
- ASP.NET Core Runtime
IF you don’t have the .NET Core hosting bundle and ASP.NET Core Runtime follow the below steps to install.
- Open this URL.
- Download and Install the Runtime and Hosting bundle as per your version.
Open our blazor application in Visual Studio 2019, 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 *.85 (Http) and you can see your hosted application inside the browser.
Recommend articles which you should read once.
- CRUD Using Blazor, Entity Framework Core And Dapper
- Sorting Table In Blazor
- Pagination In Blazor
- Searching Feature In Blazor
- Visual Studio Blazor Template With Dapper And .NET Core 3.0
hope you guys found something useful. Please give your valuable feedback/comments/questions about this article. Please let me know how you like and understand this article and how I could improve it.
Just want to check with you before I start my research, if there is a code/way to set the application’s upper limit for memory consumption? The Blazor server side code is using SignalR , I see the Ram is being consumed even while page stay idle, other developers has a concern that their application would be deprived of needed RAM and may fail if deployed along with blazor application
Valid question but Not sure buddy!
This worked for me! Thanks for the screenshots and quick to-the-point steps!
Thanks for the feedback 🙂
This does not work for me, may be some steps are missing
I don’t think so, can you please share error?
It worked , I later found the the default IIS user account doesn’t have permission to the database, i assigned another user to the app pool and it worked , Thanks for helping the community
Thanks for reading, and valuable feedback.
Hi — I am following these steps exactly but I am trying to publish to another server running windows server 2012 R2 — however I am using https so I use a self signed cert. I can’t seem to get the site to work- I have published using both self contained method and framework dependent.