In the previous article, Azure App Service: Create Web App from Visual Studio, we learned how to create a new Web App. In this article, we will learn how to link an existing web application to an App Service Web App.
Please go through the how-to-create-a-web-app-in-azure link and create a new App Service Web App.
Go to Settings Blade of the App Service Web App. Click on “Get Publish Profile” as shown below.
![App Service]()
Below is the screenshot of the file that I just downloaded.
![Web app]()
Open the Web Application that you would like to link to the Web App in Visual Studio. Right-click on the project and click on “Publish”.
![Publish]()
In the “Publish Web” window, click on the “Import” button.
![Publish Web]()
A popup will be as shown below.
![Import]()
Clicking on the “Browse” button on the above screen, a window will open as shown below. Please select the publish profile that we just downloaded.
![Browse button]()
Once you select the file, the path of the file will be displayed as shown below.
![File path]()
Once you click on the “OK” button in the previous step, the Publish window will configure the App Service and the Visual Studio Project.
![Publish window]()
That’s it. It’s how it links an existing web application to an existing or a new App Service web app on Azure. Once you click "Publish" the codes get deployed to the App Service for which you downloaded the Publish profile.