Deploy Web App To Azure

Create ASP.NET Project

Open Visual Studio.
  1. File => New => Project.
  2. Select Visual C# => Web =>ASP.NET Core Web Application (.NET Core).
 

Now, you can select ASP.NET Core Version and Templates,
  1. Select => Web Application.


After creating your Web Application, you will see the screen given below.

 

Now, run the Application and you will see the screen given below.

 
Creating Azure app Service

Now, let's create Azure app
  1. Login to http://portal.azure.com/
  2. Click New => Web + Mobile => Web App
 

After clicking or selecting web app you get new screen which you need to provide information about the app,
  1. App Name => App Name is the name, which you can give to Web app. It must be unique.
  2. Subscription => Type of subscription; which you are using.
  3. Resource Group => You can create a new resource group or, using your exiting resource.
  4. App Service Plan => App Service plans represent a set of features and capacity, which you can share across your apps. App Service plans gives you the flexibility to allocate specific apps to a set of resources and further optimize your Azure resource utilization.
 

Now, it will take a while to deploy the Web app. After it is deployed, go to your resource group and click on the Website, which you have deployed. Afterwards, you will see the screen given below.

 

Now, click Get publish Profile, which will download the publish setting, which needs to be deployed to this Web site. Afterwards, you have downloaded the published file. Let's switch back to Visual Studio.
  1. Right click on your project.
  2. Click Publish.
  3. Select Import Profile.
 

Now, locate your published file



After selecting the published file, you can change the setting of deployment. For this demo, I am using Web deployment, as shown below.

 

Now, click Publish and it will publish your Web app shortly.

 

After publish, it is complited to your Web app. It will automatically launch your Browser with your Web app.

Summary 
  • Create Web app from Visual Studio.
  • Created Azure Web app.
  • Used Azure to publish file.
  • Publish Web app from Visual Studio.