How to use Visual Studio to deploy a .NET Web App to Azure. Install Visual Studio 2019. Create an ASP.Net Web Application project and publish the Web app to Azure.
Install .NET Framework 4.8
Developer pack
https://dotnet.microsoft.com/download/dotnet-framework/net48
Install Visual Studio 2019 Community Edition
https://visualstudio.microsoft.com/downloads
Add the ASP.NET and web development workload
Tools - Get Tools and Features
File - New - Project
Select an ASP.Net Web Application project template
Enter the project name and select the .NET Framework version
Select MVC then click Create
Run the web app locally for testing
Debug - Start Without Debugging
The home page will open. Note it's running on localhost.
Right click the project - Publish
Target - Azure
Specific target - Azure App Service (Windows)
Sign in to Azure
Choose your subscription and resource group, then select the Azure Web app and click Finish.
Web App is ready to publish
Click Publish
The website will open in a browser. Note the Web app is using the generic domain name app.azurewebsites.net and is using HTTP. In the next steps, we will add a custom domain to the website and secure it with an SSL certificate.
Web app running in the Azure portal
Reference:
Quickstart: Deploy an ASP.NET web app
https://docs.microsoft.com/en-us/azure/app-service/quickstart-dotnetcore
Comments