Deploy A Blazor Application On IIS

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.

  1. CRUD Using Blazor, Entity Framework Core And Dapper
  2. Sorting Table In Blazor
  3. Pagination In Blazor
  4. Searching Feature In Blazor
  5. 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.

9 Comments

  1. premkumar

    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

    0
    0
    Reply
    1. Valid question but Not sure buddy!

      0
      0
      Reply
  2. jGroot

    This worked for me! Thanks for the screenshots and quick to-the-point steps!

    0
    0
    Reply
    1. Thanks for the feedback 🙂

      0
      0
      Reply
  3. Premkumar

    This does not work for me, may be some steps are missing

    0
    0
    Reply
    1. I don’t think so, can you please share error?

      0
      0
      Reply
      1. Premkumar

        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

        0
        0
        Reply
        1. Thanks for reading, and valuable feedback.

          0
          0
          Reply
    2. Bret

      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.

      0
      0
      Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

Subscribe

Select Categories