Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions blazor-toc.html
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,18 @@
<li>
<a href="/blazor/common/html-attributes">HTML Attributes</a>
</li>
<li>
<a href="/blazor/common/deployment">Deployment</a>
<li>Deployment
<ul>
<li>
<a href="/blazor/common/deployment/publish">Publish Blazor Application</a>
</li>
<li>
<a href="/blazor/common/deployment/deployment-iis">Deploy a Blazor Web App to IIS</a>
</li>
<li>
<a href="/blazor/common/deployment/deployment-azure">Deploy a Blazor Web App to Azure App Service</a>
</li>
</ul>
</li>
<li>
<a href="/blazor/common/cdn-fallback">CDN Fallback</a>
Expand Down
82 changes: 82 additions & 0 deletions blazor/common/deployment/deployment-azure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---
layout: post
title: Deploy a Blazor Web App to Azure App Service | Syncfusion
description: Learn here all about deploying the Blazor application with Syncfusion Blazor Components to Azure App Service.
platform: Blazor
component: Common
documentation: ug
---

# Deploy Blazor Web App to Azure App Service

This section provides information about deploying a Blazor Web applications with the Syncfusion Blazor components to Azure App Service.

Refer to [Host and deploy ASP.NET Core Blazor](https://learn.microsoft.com/en-us/aspnet/core/blazor/host-and-deploy/?view=aspnetcore-7.0&tabs=visual-studio) topic for more information.

## Deployment procedure

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

### Create a resource in Azure

* Click **Create a resource** in Azure Portal to create a resource group.

![Create new resource](../images/create-new-resource.png)

* Select **Web App** Azure application service.

![Select web app](../images/web-app.png)

* After selecting Web App option, choose an appropriate resource group name and instance details.

* Once this is done, click **Review + create**.

![Create resource](../images/create-resource.png)

* After configuring the Web App service. Select the created web app service (blazor-web-publish).

![Created resource](../images/created-resource.png)

* Now, select the **overview** section, click on **Download publish profile**, and save the profile locally.

![Download publish profile](../images/download-publish-profile.png)

### Publish the Application in Azure

#### Using Azure account login

* To publish the project, right-click on it and choose **Publish** from the context menu.

![Publish menu](../images/publish-menu.png)

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

![Publish target](../images/publish-target.png)

![Publish specific target](../images/publish-specific-target.png)

* You need to log into your Azure account and choose the web app service (blazor-web-publish) that you have created. Then, click **Publish**.

![Created azure app service](../images/created-azure-resource.png)

![Publish App](../images/publish-azure.png)

#### Using Import Profile option

* To publish the project, right-click on it and choose **Publish** from the context menu.

![Publish menu](../images/publish-menu.png)

* Select **Import Profile** as the target and browse the downloaded publish folder. Then, click **Publish**

![Publish target](../images/target-import-profile.png)

![Publish App](../images/publish-azure.png)

* Now, the application will be deployed and will be available in the specified URL: https://blazor-web-publish.azurewebsites.net/.

![Output-Azure](../images/output-azure.png)

## See also

Refer [here](https://learn.microsoft.com/en-us/azure/app-service/quickstart-dotnetcore?tabs=net70&pivots=development-environment-vs#publish-your-web-app) for publishing the application to Azure App Service using Visual Studio.
46 changes: 46 additions & 0 deletions blazor/common/deployment/deployment-iis.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
layout: post
title: Deploy a Blazor Web App to IIS | Syncfusion
description: Learn here all about deploying the Blazor application with Syncfusion Blazor Components to IIS server.
platform: Blazor
component: Common
documentation: ug
---

# Deploy Blazor Web App to IIS server

This section provides information about deploying a Blazor Web applications with the Syncfusion Blazor components to IIS server.

Refer to [Host and deploy ASP.NET Core Blazor](https://learn.microsoft.com/en-us/aspnet/core/blazor/host-and-deploy/?view=aspnetcore-7.0&tabs=visual-studio) topic for more information.

## Create an IIS Site

* [Enable IIS](https://learn.microsoft.com/en-us/previous-versions/dynamicsnav-2018-developer/How-to--Install-and-Configure-Internet-Information-Services-for-Microsoft-Dynamics-NAV-Web-Client)in Windows Features.

* [Enable WebSockets](https://learn.microsoft.com/en-us/aspnet/core/fundamentals/websockets?view=aspnetcore-7.0#enabling-websockets-on-iis) in IIS.

* Now, publish the application for deployment in Release configuration by referring to [this](https://blazor.syncfusion.com/documentation/common/deployment).

* Open Internet Information Services (IIS) Manager and then right-click on "Sites," followed by selecting "Add Website."

![Add site in IIS](../images/add-site.png)

* In the Add Website dialog, fill in the required field values such as site name, physical path and customized port value and then click OK.

Set the physical path to the location where your sample application is developed.

![Add Website in IIS](../images/add-website.png)

## Run the Published Application

* Open Internet Information Services (IIS) Manager. Expand the `Sites` node to verify that the published application is running. Click `Browse` to open the application in your browser.

![Browse application](../images/browser-website.png)

* Now, application runs in the specified browser port(8080).

![Output-IIS](../images/iis-output.png)

## See also

Refer [here](https://learn.microsoft.com/en-us/aspnet/core/tutorials/publish-to-iis?view=aspnetcore-7.0&tabs=visual-studio) for publishing the application to IIS Service using Visual Studio.
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,25 @@ documentation: ug

This section provides information about publishing and deploying Blazor applications with the Syncfusion Blazor components.

For more information, see [Host and deploy ASP.NET Core Blazor](https://learn.microsoft.com/en-us/aspnet/core/blazor/host-and-deploy).
Refer to [Host and deploy ASP.NET Core Blazor](https://learn.microsoft.com/en-us/aspnet/core/blazor/host-and-deploy/?view=aspnetcore-7.0&tabs=visual-studio) topic for more information.

## Publish Blazor Application with Visual Studio

* Right-click on the project in the `Solution Explorer` and select `Publish`.

![Solution Explorer in Blazor](./images/publish.png)
![Solution Explorer in Blazor](../images/publish.png)

* Then, select the `Folder` option and select the publishing target location.

![Publish Location in Blazor](./images/folder.png)
![Publish Location in Blazor](../images/folder.png)

* Check the configuration as Release by clicking the `Advanced...` option below the target location.

![Release Configuration in Blazor](./images/config.png)
![Release Configuration in Blazor](../images/config.png)

* For `Blazor Server side application`, set Deployment Mode as `Self-Contained`. Because some dependencies are not loaded properly when the published folder is hosted.

![Deploy Mode in Blazor](./images/deploy.png)
![Deploy Mode in Blazor](../images/deploy.png)

* Then, click `Save` and `Publish`.

Expand Down Expand Up @@ -59,7 +59,7 @@ dotnet publish -c Release --self-contained true -r win-x86
{% endhighlight %}
{% endtabs %}

Refer to [dotnet publish arguments](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-publish#arguments) to learn about optional arguments. Use the following command to specify the output directory path.
Refer to the [dotnet publish - arguments](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-publish?tabs=netcore21#arguments) to learn about various optional arguments. Use the following command to specify the path for the output directory.

{% tabs %}
{% highlight c# tabtitle=".NET CLI" %}
Expand All @@ -75,7 +75,7 @@ If the path is relative, the output directory generated is relative to the proje

## Ahead-of-time (AOT) compilation in Blazor WebAssembly

Blazor WebAssembly supports ahead-of-time (AOT) compilation, which improves runtime performance at the expense of a larger app size. For details and enable steps, see [Ahead-of-time (AOT) compilation](https://learn.microsoft.com/en-us/aspnet/core/blazor/host-and-deploy/webassembly#ahead-of-time-aot-compilation).
Blazor WebAssembly supports ahead-of-time (AOT) compilation which provides improved runtime performance at the expense of a larger app size. Refer to [Ahead-of-time (AOT) compilation](https://learn.microsoft.com/en-us/aspnet/core/blazor/host-and-deploy/webassembly?view=aspnetcore-6.0#ahead-of-time-aot-compilation) topic to learn more about how it works and how to enable.

### Enable AOT in the application

Expand Down
Binary file added blazor/common/images/add-site.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added blazor/common/images/add-website.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added blazor/common/images/browser-website.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added blazor/common/images/create-new-resource.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added blazor/common/images/create-resource.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added blazor/common/images/created-azure-resource.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added blazor/common/images/created-resource.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added blazor/common/images/download-publish-profile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added blazor/common/images/iis-output.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added blazor/common/images/output-azure.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added blazor/common/images/publish-azure.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added blazor/common/images/publish-menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added blazor/common/images/publish-specific-target.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added blazor/common/images/publish-target.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added blazor/common/images/target-import-profile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added blazor/common/images/web-app.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading