Live Chat Icon For mobile
Live Chat Icon

How do I deploy a Blazor Server application to Azure App Service?

Platform: Blazor| Category: Host and deploy

Follow the steps below to deploy a Blazor Server application to Azure app service.

  1. Create a Blazor Server application

    To create a blazor Server Application using the following steps

    1. Open Visual Studio 2019 and create a new project.


    2. Once Blazor App is selected, click Next button to configure the project name and location.

    3. Save the application, and then click Create.

    4. Select Blazor Server App and click Create to complete the application creation.

      Create a Blazor Server Application

  2. Deploying to Azure app service

    To Deploying the Azure App Service using the following steps.

    1. If you don’t have a login for Azure, sign up to access the Azure portal.

    2. Click Create a resource in Azure to create a resource group.


    3. Select the Web App Azure application service.


    4. Once Web App is selected, select the following options:

      • Select Free Trial as the subscription.

      • Create a resource group name, such as “Blazor.”

      • Update the Instance Details:

        1. Name: blazor-publish. The application hosted will be available in this URL:

        2. Select the Code radio button for Publish.

        3. Choose the .NET Core 3.1 LTS runtime stack and Windows operating system.

        4. Select the region in which to publish the app. Central US was chosen for this demo.

      • The app service plan with the Free F1 option will be selected by default, but this can be modified.

      • Once this is done, click Review + create.


    5. After configuring the Web App Service, get the publish profile for the Web App Service to host the Blazor Server application. Select the created web app service (blazor-publish).


    6. Navigate to the overview section and click Get publish profile, and the save the profile locally.


  3. Publish a Blazor Server application in Azure

    • Using import-profile option

      To using import-profile option using the following steps.

      1. Right-click the project and click Publish in the context menu.


      2. Choose Import Profile and click Next button. Then, locate the downloaded publish profile for the web app service.


      3. Finally, publish the application by clicking Publish. The application will be deployed and will be available in the URL


    • Using Azure account login

      To using Azure account login using the following steps.

      1. In Visual Studio 2019, right-click on the project and click Publish in the context menu.


      2. Select Azure as the target.


      3. Select Azure App Service (Windows) as the specific target.


      4. You need to log in to your Azure account and choose the web app service.


      5. Now click publish to deploy the application.


      6. Now, the application will be deployed and will be available in the following URL.

Refer to “Publish an ASP.NET Core app to Azure with Visual Studio” for more details.

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.