Build and Deploy Web Application as Azure App Service Web App

Deploying your app to App Service is a matter of deploying your code, binaries, content files, and their respective directory structure, to the /site/wwwroot directory in Azure (or the /site/wwwroot/App_Data/Jobs/ directory for WebJobs).

  1. Create a Web App in Azure Portal
    1. Login to Azure Portal,
    2. Azure Portal => More Services => Web App => + Add
    3. Select Web Apps => Create
    4. Name = “DssDemoWebApp”, Subscription = “Free Trail” Resource Group=”DemoRG”, App Service plan/Location=Create New Plan (Name=Standard_Plan, Location=Central US, Pricing tier=S1 Standard.
    5. Application Insights=Off
    6. Create
  2. Visual Studio  => Create a new ASP.NET MVC Web Application in Azure Web Service
    1. File => New => Project
    2. Visual C# =>NET Web Application, Project Name=”DemoWebApp” => OK
    3. Select Template = MVC, Change Authentication = No Authentication => OK
    1. Deploy / Publish the project from VS.NET.
      1. In Solution Explorer, right-click the project, and choose Publish.
  3. The wizard opens to a publish profile that has settings for deploying the web project to the new web app. If you wanted to deploy to a different web app, you could click the Profile tab to create a different profile.
    1. Choose default options and finally click on Publish.

    The Output and Azure App Service Activity windows show what deployment actions were taken and report successful completion of the deployment.

  4. Getting Publish Profile from Azure Portal and publishing from Visual Studio
    1. Click App Services, and then click the name of your web app.
    2. In the tool bar click on Get Publish Profile
    3. Save the Profile locally on your disk.
    4. Go to VS.NET, Right Click on Project => Publish
    5. Select Profile Tab => Click Import => Provide the downloaded profile name => OK
    6. Click Publish.Note: Profile will be saved for further use in <Project>/Properties/PublishProfiles/*.pubxml

To Gets an Azure Web App publishing profile using PowerShell:

Get-AzureRmWebAppPublishingProfile -ResourceGroupName "DemoRG" -Name "DemoWebApp" -Format "WebDeploy" -OutputFile "D:\outputfile.publishsettings"

Publishing using FTP tools like FileZilla

  1. Azure Portal => Click App Services, and then click the name of your web app.
  2. Go to Settings => select Deployment Credentials
  3. Provide FTP/deployment username and password
  4. Save
  5. Look at Essentials Section of Selected App Service and copy FTPS hostname and username
  6. Open Windows Explorer and use the above hostname and credentials to connect and upload files.

Note: Although it’s easy to copy your web app’s files to Azure using FTP utilities, they don’t automatically take care of or coordinate related deployment tasks such as deploying a database or changing connection strings. Also, many FTP tools don’t compare source and destination files in order to skip copying files that haven’t changed. For large Apps, always copying all files can result in long deployment times even for minor updates since all files are always copied.


Mr. Sandeep Soni, CEO & Founder of Deccansoft Software Services.He has over 21years of Experience in Teaching and Development using Microsoft Technologies. Since 1997, of the total 100000+ students Deccansoft has trained, he has personally trained over 60,000+ students and we are proud of him because almost every student he had trained is very happy with the quality and many are well placed in various I.T Firms.

Sharing is caring!

Leave a Reply

Your email address will not be published. Required fields are marked *