Deploy Asp.Net Application in Azure and Manage Configurations And Switch from Stating to Production

When we need to deploy an Asp.Net application on online, we need to have a virtual machine and iis installed on that machine. The deployment process will be manual. You need to manage the iis settings and point to the path/folder where your application code exists on that virtual machine. To make this process simple Azure is giving App Services which makes the deployment more simpler and quick.

Steps to Deploy Asp.net Code to Azure App Service:

Step #1: 

Go to the portal.azure.com and login with your credentials.



Step #2: 
Now we need to create an app service. After logging in, on the left side you see different menu items listed. You need to click on App Services.  Then click on Add button to add new App Service. 




Step #3: 
After clicking on Add we see all the types of App Services in the right side. Select "Asp .net Empty Web App" and then click on create button.


Step #4:
After clicking on Create button you will be provided with a screen where you can enter domain name of you choice and subscription and Resource group. Fill all the details and Click on create button. After that it will take few mins to create App Service.  You can see newly created App Service by clicking on App Services button.


Step #5:
You can see the Url for you newly created App Service by clicking on the App Service name. And download the "Get Publish Profile" on your machine.
Step #6:
In Visual Studio, create a new asp.net  web project and then select mvc.

Step #7:
Once the project is created, right click on solution and then click on publish button. And follow the steps as below.


Click on Import button and browse the previously downloaded "Get Publish Profile" file.




Finally click on "Publish" button.

Step #8:
Once the publish is succeeded, you can see the newly publish website by browsing the url of your app service.

How to Config Environment Specific Values:

How to Switch from Staging to Production:



Comments

Popular posts from this blog

Different ways of Handling Bulk Inserts using C# and SQL Server

How to create multi project templates in Visual Studio 2017?

How to record Skype calls along with Video and Audio in Windows 7+