---
title: "How to Deploy a Blazor Application in Azure App Service"
published_at: "2020-11-30T10:00:05+00:00"
modified_at: "2025-11-25T11:57:14+00:00"
url: "https://www.syncfusion.com/blogs/post/deploy-blazor-application-in-azure-app-service"
excerpt: "Deploy a Blazor Application in Azure App Service with Visual Studio, publish profiles, and subfolder options for smooth hosting."
taxonomy_category:
  - "Azure"
  - "Blazor"
  - "Development"
  - "Web"
taxonomy_post_tag:
  - "Azure"
  - "Blazor"
  - "Cloud Service"
  - "deployment"
  - "Web"
---

# How to Deploy a Blazor Application in Azure App Service

[Sridhar Narasimhan](https://www.syncfusion.com/blogs/author/sridharn)

![How to Deploy a Blazor Application in Azure App Service](https://www.syncfusion.com/blogs/wp-content/uploads/2020/11/How-to-Deploy-a-Blazor-Application-in-Azure-App-Service.png)


**TL;DR:** Discover how to deploy a Blazor Server app to Azure App Service using Visual Studio, whether publishing directly, importing a publish profile, or targeting a custom subfolder so your apps run smoothly and are production‑ready on Azure.

In this blog, we’ll walk you through deploying a default Blazor server application created in Visual Studio 2019 in Azure App Service. We will see three different ways we can deploy a Blazor application:

- Use an import profile (Web App service profile) in Visual Studio 2019.
- Use the Azure Portal login in Visual Studio 2019.
- Publish in a specific subfolder in Azure.

## Creating a Blazor server application

In this segment, we are going to create a Blazor server application using Visual Studio 2019.

1. Open [Visual Studio](https://visualstudio.microsoft.com/vs/) and create a new project. ![Open Visual Studio 2019 and create a new project](https://www.syncfusion.com/blogs/wp-content/uploads/2020/11/Open-Visual-Studio-2019-and-create-a-new-project.png)
2. Once **Blazor App** is selected, click ** Next** 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. ![Select Blazor Server App and click Create to complete the application creation](https://www.syncfusion.com/blogs/wp-content/uploads/2020/11/Select-Blazor-Server-App-and-click-Create-to-complete-the-application-creation.png)


## Deploying in Azure portal

If you don’t have a login for Azure, [sign up](https://azure.microsoft.com/en-in/free/)
 to access the Azure Portal.

1. Click **Create a resource** in Azure to create a resource group. ![Click Create a resource in Azure to create a resource group](https://www.syncfusion.com/blogs/wp-content/uploads/2020/11/Click-Create-a-resource-in-Azure-to-create-a-resource-group.png)
2. Select **Web App** Azure application service. ![Select Web App Azure application service](https://www.syncfusion.com/blogs/wp-content/uploads/2020/11/Select-Web-App-Azure-application-service.png)
3. Once Web App is selected, select the following options:![Create Web App window](https://www.syncfusion.com/blogs/wp-content/uploads/2020/11/Create-Web-App-window.png)
  1. Free Trial selected as the subscription.
  2. Create a resource group name. I have named mine Blazor.
  3. Update the Instance Details: Name: blazor-publish. The application hosted will be available in this URL: blazor-publish.azurewebsites.net. Select the Code box for Publish. Choose the .NET Core 3.1 LTS runtime stack and Windows operating system. Select the region in which to publish the app. I am choosing the Central US region for this demo.
  4. The app service plan with the Free F1 option will be selected by default, but this can be modified.
  5. Once this is done, click **Review + create**.

4. After configuring the Web App service, get the publish profile for the Web App service to host the Blazor application. Select the created web app service (blazor-publish).![Select the created web app service (blazor-publish).](https://www.syncfusion.com/blogs/wp-content/uploads/2020/11/Select-the-created-web-app-service-blazor-publish..png)
5. Navigate to the overview section, click on **Get publish profile**, and save the profile locally. ![Navigate to the overview section, click on Get publish profile, and save the profile locally](https://www.syncfusion.com/blogs/wp-content/uploads/2020/11/Navigate-to-the-overview-section-click-on-Get-publish-profile-and-save-the-profile-locally.png)


### Publish a Blazor server application in Azure

#### Using import-profile option

1. Right-click the project and click **Publish** in the context menu. ![Right-click the project and click Publish in the context menu](https://www.syncfusion.com/blogs/wp-content/uploads/2020/11/Right-click-the-project-and-click-Publish-in-the-context-menu.png)
2. Choose **Import Profile** and click ** Next**. Then, locate the downloaded publish profile for the web app service. ![Choose Import Profile and click Next](https://www.syncfusion.com/blogs/wp-content/uploads/2020/11/Choose-Import-Profile-and-click-Next.png)
3. Finally, publish the application by clicking **Publish**. The application will be deployed and will be available at the URL. ![Publish the application by clicking Publish](https://www.syncfusion.com/blogs/wp-content/uploads/2020/11/Publish-the-application-by-clicking-Publish.png)

#### Publish using Azure account login

1. Right-click on the project and click **Publish** in the context menu. ![Right-click on the project and click Publish in the context menu](https://www.syncfusion.com/blogs/wp-content/uploads/2020/11/Right-click-on-the-project-and-click-Publish-in-the-context-menu-2.png)
2. Select **Azure** as the target and ** Azure App Service (Windows)** as the specific target. ![Select Azure as the target](https://www.syncfusion.com/blogs/wp-content/uploads/2020/11/Select-Azure-as-the-target-and-Azure-App-Service-Windows-as-the-specific-target.png) ![Select Azure App Service (Windows) as the specific target](https://www.syncfusion.com/blogs/wp-content/uploads/2020/11/Select-Azure-App-Service-Windows-as-the-specific-target.png)
3. You need to log into your Azure account and choose the web app service. Then, click **Publish**. ![Login into your Azure account and choose the web app service. Then, click Publish](https://www.syncfusion.com/blogs/wp-content/uploads/2020/11/Login-into-your-Azure-account-and-choose-the-web-app-service.-Then-click-Publish.png) ![Click on Publish](https://www.syncfusion.com/blogs/wp-content/uploads/2020/11/Click-on-Publish.png)

Now, the application will be deployed and will be available.  
 ![Output](https://www.syncfusion.com/blogs/wp-content/uploads/2020/11/Output-6.png)


#### Publish in a specific subfolder in Azure

If you need to deploy the Blazor application in a specific subfolder in Azure, create the folder using the **Advanced Tools** tab under Development Tools in the app service. Click the ** Go** link, choose ** CMD** in the debug console, and click on the **+** button to add a new folder. Here I have named the folder blazor-server-publish.  
 ![blazor server publish window](https://www.syncfusion.com/blogs/wp-content/uploads/2020/11/blazor-server-publish-window.png)

1. Configure the path mappings for the created folder blazorserver. Set site \blazorserver as the physical path and /blazorserver as the virtual path. ![Set site \blazorserver as the physical path and/blazorserver as the virtual path.](https://www.syncfusion.com/blogs/wp-content/uploads/2020/11/Set-blazorserver-as-the-physical-path-andblazorserver-as-the-virtual-path.png)
2. Use the import Azure profile option. Locate the downloaded publish profile for the newly created web app service.
3. Edit the publish options to modify the site name and destination folder URL to include /blazorserver/.
4. Click **Save**. Then select ** Publish** to launch the application in the specified subfolder. ![Click Save. Then select Publish to launch the application in the specified subfolder](https://www.syncfusion.com/blogs/wp-content/uploads/2020/11/Click-Save.-Then-select-Publish-to-launch-the-application-in-the-specified-subfolder.png)

The application will be launched in the specified subfolder as shown in the following screenshot.  
 ![Output](https://www.syncfusion.com/blogs/wp-content/uploads/2020/11/Output-7.png)  
 [https://www.syncfusion.com/downloads/blazor](https://www.syncfusion.com/downloads/blazor)

## Summary

In this blog, you have learned the step-by-step procedure to create a Blazor server application, followed by the steps to deploy that application in the Azure Portal. All three methods to deploy the application are done using the publish profile option and Azure Portal login. I hope you found this article helpful.

[Syncfusion Essential Studio for Blazor](https://www.syncfusion.com/blazor-components)
 offers 65+ high-performance, lightweight, and responsive UI components for the web, including file-format libraries, in a single package. Please take a look at our live demos in our [sample browser](https://blazor.syncfusion.com/)
 for a hands-on experience.

If you’re a Syncfusion user, you can download the setup from the [license and downloads](https://www.syncfusion.com/account/downloads)
 page. Otherwise, you can download a free [30-day trial](https://www.syncfusion.com/downloads/)
.

You can also contact us through our [support forum](https://www.syncfusion.com/forums)
, [support portal](https://support.syncfusion.com/)
, or [feedback portal](https://www.syncfusion.com/feedback)
 for queries. We are always happy to assist you!

## Related Blogs



[Build AI-Powered Water Consumption Chart Using Azure OpenAI and Blazor Spline Charts](https://www.syncfusion.com/blogs/post/ai-water-consumption-chart-blazor-spline)



[Smart PDF Redaction in WPF Using Azure OpenAI for Privacy & Compliance](https://www.syncfusion.com/blogs/post/pdf-redaction-wpf-azure-openai)



[Effortlessly Open, Edit, and Auto-Save Word Documents in React with Azure Blob Storage](https://www.syncfusion.com/blogs/post/azure-blob-storage-in-react)



[Integrate Azure OpenAI with Blazor Maps for Smarter, AI-Powered Mapping](https://www.syncfusion.com/blogs/post/azure-openai-blazor-maps)
