Deploy a .NET Web App to Azure using Visual Studio
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.
1. Create a Web App using Azure CLI
2. Deploy a .NET Web App to Azure using Visual Studio
3. Add a custom domain to an Azure Web App
4. Configure SSL for an Azure Web App using an App Managed Certificate
5. Configure SSL for an Azure Web App using Let's Encrypt
Install Visual Studio 2019
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
Create a new project
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.
Publish the Web App to Azure
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