@ -1,6 +1,6 @@
# Deploy Abp Webapp to Azure App Service
> In this document, you'll learn how to create and deploy your first abp web app to [Azure App Service](https://docs.microsoft.com/en-us/azure/app-service/overview). App Service supports various versions of .NET apps, and provides a highly scalable, self-patching web hosting service. Abp web apps are cross-platform and can be hosted on Linux or Windows.
> In this document, you'll learn how to create and deploy your first abp web app to [Azure App Service](https://docs.microsoft.com/en-us/azure/app-service/overview). The App Service supports various versions of .NET apps, and provides a highly scalable, self-patching web hosting service. Abp web apps are cross-platform and can be hosted on Linux and Windows.
****Prerequisites****
@ -10,36 +10,36 @@
## Create a new ABP Framework application
Create repository on [GitHub.com](https://github.com/) to create a new repository (keep all the default settings)
Create a repository on [GitHub.com](https://github.com/) (keep all the default settings)
Open a command prompt and clone the repository into a folder on your computer
Open the command prompt and clone the repository into a folder on your computer
```bash
git clone https://github.com/your-username/your-repository-name.git
```
Check your dotnet version. S hould be at least 3.1.x
Check your dotnet version. It s hould be at least 3.1.x
```bash
dotnet --version
```
Install or update first the *ABP CLI* using a command line window
Install or update the *ABP CLI* using a command line window
```bash
dotnet tool install -g Volo.Abp.Cli || dotnet tool update -g Volo.Abp.Cli
```
Open a comman prompt in the *GitHub repository folder* and create a *new abp Blazor solution* with the command below
Open the command prompt in the *GitHub repository folder* and create a *new abp Blazor solution* with the command below
```bash
abp new YourAppName -u blazor
```
Open a command prompt in the *[YourAppName].DbMigrator* project and enter the command below to apply the database migrations
Open the command prompt in the *[YourAppName].DbMigrator* project and enter the command below to apply the database migrations
```bash
dotnet run
```
Open a command prompt in the *[YourAppName].HttpApi.Host* project to run the API project
Open the command prompt in the *[YourAppName].HttpApi.Host* project to run the API project
```bash
dotnet run
@ -47,7 +47,7 @@ dotnet run
Navigate to the *applicationUrl* specified in *the launchSettings.json* file of the *[YourAppName].HttpApi.Host project*. You should get the *Swagger window*
Open a command prompt in the *[YourAppName].Blazor* folder and enter the command below to run the Blazor project
Open the command prompt in the *[YourAppName].Blazor* folder and enter the command below to run the Blazor project
```bash
dotnet run
@ -61,7 +61,7 @@ Before the github commit, you have to delete "**/wwwroot/libs/*" at *.gitignore*

Open a command prompt in the root folder of your project and *add, commit and push* all your changes to your GitHub repository
Open the command prompt in the root folder of your project and *add, commit and push* all your changes to your GitHub repository
```bash
git add .
@ -70,11 +70,11 @@ git push
```
## Create an SQL Database on Azure and change connection string in appsettings.json files
## Create a SQL Database on Azure and change the connection string in the appsettings.json files
* Login into the [Azure Portal](https://portal.azure.com/)
* Login into [Azure Portal](https://portal.azure.com/)
* Click on **Create a resouce**
* Click **Create a resour ce**
* Search for *SQL Database*
@ -92,30 +92,30 @@ git push
* Check *Allow Azure services to access server*
* Click on **Configure database**. Go for the *Basic* version and click the **Apply** button
* Click **Configure database**. Go to the *Basic* version and click the **Apply** button
* Click on the **Review + create** button. Click **Create**
* Click the **Review + create** button. Click **Create**
* Click on **Go to resource** and click on **SQL server** when the SQL Database is created
* Click **Go to resource** and click **SQL server** when the SQL Database is created
* Click on **Networking** under Security left side menu
* Click **Networking** under Security left side menu
* Select **Selected networks** and click on **Add your client IP$ address** at Firewall rules
* Select **Selected networks** and click **Add your client IP$ address** at the Firewall rules
* Select **Allow Azure and resources to access this seerver** and save
* Go to your **SQL database** , click on **Connection strings** and copy the connection string
* Go to your **SQL database** , click **Connection strings** and copy the connection string
* Copy/paste the appsettings.json files of the [YourAppName].HttpApi.Host and the [YourAppName].DbMigrator project
* Do not forget to replace {your_password} with the correct server password you entered in Azure SQL Database
Open a command prompt in the [YourAppName].DbMigrator project again and enter the command below to apply the database migrations
Open the command prompt in the [YourAppName].DbMigrator project again and enter the command below to apply the database migrations
```bash
dotnet run
```
Open a command prompt in the [YourAppName].HttpApi.Host project and enter the command below to check your API is working
Open the command prompt in the [YourAppName].HttpApi.Host project and enter the command below to check your API is working
```bash
dotnet run
@ -123,7 +123,7 @@ dotnet run
Stop the [YourAppName].HttpApi.Host by entering CTRL+C
Open a command prompt in the root folder of your project and add, commit and push all your changes to your GitHub repository
Open the command prompt in the root folder of your project and add, commit and push all your changes to your GitHub repository
```bash
git add .
git commit -m initialcommit
@ -135,31 +135,31 @@ git push
* Sign in into Azure DevOps
* Click on **New organization** and follow the steps to create a new organisation. Name it [YourAppName]org
* Click **New organization** and follow the steps to create a new organisation. Name it [YourAppName]org
* Enter [YourAppName]Proj as project name in the Create a project to get started window
* Enter [YourAppName]Proj as project name in the ** * Create a project to get started*** window
* Select **Public visibility** and click the **Create project** button
* Click on the Pipelines button to continue
* Click the ** Pipelines** button to continue
* Click on the **Create Pipeline** button
* Click the **Create Pipeline** button
Select GitHub in the Select your repository window

* Enter Connection name. [YourAppName]GitHubConnection and click on **Authorize using OAuth**
* Enter the Connection name. [YourAppName]GitHubConnection and click **Authorize using OAuth**
* Select your **GitHub** [YourAppName]repo and click Continue
* Search for **ASP.NET** in the Select a template window
* Search for **ASP.NET** in the ** * Select a template*** window

* Select the ASP.NET Core template and click the **Apply** button
* Add below commands block as a first step in the pipeline
* Add the below commands block as a first step in the pipeline
```
- task: UseDotNet@2
@ -176,7 +176,7 @@ git push

* Add below commands block to end of the pipeline
* Add the below commands block to the end of the pipeline
```
- task: PublishBuildArtifacts@1
@ -241,43 +241,43 @@ steps:
condition: succeededOrFailed()
```
* Click on **Save & queue** in the top menu. Click on **Save & queue** again and click **Save an run** to run the Build pipeline
* Click **Save & queue** in the top menu. Click **Save & queue** again and click **Save an d run** to run the Build pipeline
* When the Build pipeline has finished. Click on **1 published; 1 consumed**
* When the Build pipeline has finished. Click **1 published; 1 consumed**
## Create a Web App in the Azure Portal to deploy [YourAppName].HttpApi.Host project
* Search for Web App in the Search the Marketplace field
* Search for Web App in the * Search the Marketplace* field
* Click the **Create** button in the Web App window
* Select rg[YourAppName] in the Resource Group dropdown
* Select rg[YourAppName] in the * Resource Group* dropdown
* Enter [YourAppName]API in the Name input field
* Enter [YourAppName]API in the * Name input* field
* Select code, .NET Core 3.1 (LTS) and windows as Operating System
* Select code, .NET Core 3.1 (LTS) and windows as * Operating System*
* Enter [YourAppName]API in the Name input field
* Enter [YourAppName]API in the * Name input* field
* Select .NET Core 3.1 (LTS) in the Runtime stack dropdown
* Select .NET Core 3.1 (LTS) in the * Runtime stack* dropdown
* Select Windows as Operating System
* Select Windows as * Operating System*
* Select the same Region as in t the SQL server you created in Part 3
* Select the same * Region* as in the SQL server you created in Part 3

* Click on **Create new** in thet Windows Plan. Name it [YourAppName]ApiWinPlan
* Click **Create new** in the Windows Plan. Name it [YourAppName]ApiWinPlan
* Click **Change size** in Sku and size. Go for the Dev/Test Free F1 version and click the **Apply** button
* Click **Change size** in Sku and size. Go to the Dev/Test Free F1 version and click the **Apply** button

* Click the **Review + creat ** e** button. Click **Create** button
* Click the **Review + creat e** button. Click the **Create** button
* Click on **Go to resource** when the Web App has been created
* Click **Go to resource** when the Web App has been created
@ -285,15 +285,15 @@ steps:
* Sign in into [Azure DevOps](https://azure.microsoft.com/en-us/services/devops/)
* Click on [YourAppName]Proj and click on **Releases** in the *Pipelines* menu
* Click [YourAppName]Proj and click **Releases** in the *Pipelines* menu
* Click on the **New pipeline** button in the *No release pipelines found* window
* Click the **New pipeline** button in the *No release pipelines found* window
* Select *Azure App Service deployment* and click the **Apply** button

* Enter *[YourAppName]staging* in the *Stage name* field in the *Stage* winwow. Clos e window
* Enter *[YourAppName]staging* in the *Stage name* field in the *Stage* window. And close th e window
* Click **+ Add an artifact** in the *Pipeline* tab
@ -303,15 +303,15 @@ steps:

* Click on the **Continuous deployment trigger (thunderbolt icon)**
* Click the **Continuous deployment trigger (thunderbolt icon)**
* Set the toggle to **Enabled** in the the *Continous deployment trigger* window
* Set the toggle to **Enabled** in the the *Continu ous deployment trigger* window
* Click **+ Add** in *No filters added*. Select **Include** in the *Type* dropdown. Select your branch in the *Build* branch dropdown and close the window
* Click **+ Add** in *No filters added*. Select **Include** in the *Type* dropdown. Select your branch in the *Build branch* dropdown and close the window

* Click on **the little red circle with the exclamation mark** in the *Tasks* tab menu
* Click **the little red circle with the exclamation mark** in the *Tasks* tab menu
* Select your subscription in the *Azure subscription* dropdown.
@ -319,19 +319,19 @@ steps:
* Click **Authorize** and enter your credentials in the next screens
* After Authoris ation, select the **[YourAppName]API** in the *App service name* dropdown
* After Authoriz ation, select the **[YourAppName]API** in the *App service name* dropdown
* Click on the **Deploy Azure App Service** task
* Click the **Deploy Azure App Service** task
* Select **[YourAppName].HttpApi.Host.zip** in the *Package or folder* input field

* Click on the **Save** icon in the top menu and click **OK**
* Click the **Save** icon in the top menu and click **OK**
* Click **Create release** in the top menu. Click **Create**to create a release>
* Click **Create release** in the top menu. Click **Create** to create a release
* Click on the *Pipeline* tab and wait until the Deployment succeeds
* Click the *Pipeline* tab and wait until the Deployment succeeds

@ -345,11 +345,11 @@ https://[YourAppName]api.azurewebsites.net
## Create a Web App in the Azure Portal to deploy [YourAppName].Blazor project
## Create a Web App in Azure Portal to deploy [YourAppName].Blazor project
* Login into the [Azure Portal](https://portal.azure.com/)
* Login into [Azure Portal](https://portal.azure.com/)
* Click on **Create a resouce**
* Click **Create a resour ce**
* Search for *Web App* in the *Search the Marketplace* field
@ -365,13 +365,13 @@ https://[YourAppName]api.azurewebsites.net
* Select the same region as the SQL server you created in Part 3
* Select the [YourAppName]ApiWinPlan in the Windows Plan dropdown
* Select the [YourAppName]ApiWinPlan in the * Windows Plan* dropdown

* Click the **Review + create** button. Click **Create** button
* Click on **Go to resource** when the Web App has been created
* Click **Go to resource** when the Web App has been created
* Copy the URL of the Blazor Web App for later use
@ -404,21 +404,21 @@ Copy the URL of the Api Host and Blazor Web App. Change appsettings.json files i
* Enter *BlazorDeployment* in the *Stage name* input field and close the *Stage* window
* Click on the **little red circle with the exclamation mark** in the BlazorDeployment stage
* Click the **little red circle with the exclamation mark** in the BlazorDeployment stage
* Select your subscription in the *Azure subscription* dropdown
* Select your Blazor Web App in the *App service name* dropdown
* Click on the **Deploy Azure App Service task**
* Click the **Deploy Azure App Service task**
* Select *[YourAppName].Blazor.zip* in the *Package or folder* input field

* Click **Save** in the top menu and click on the **OK** button after
* Click **Save** in the top menu and click the **OK** button after
* Click **Create release** in the top menu and click on the **Create** button
* Click **Create release** in the top menu and click the **Create** button
