Deploying to Azure App Service from Azure Portal

Last updated: June 13, 2025

Sometimes, you may need to deploy using Web Deploy - such as if the Kudu site is down or if your company prefers Web Deploy. This demo will walk you through deploying via Web Deploy.

To deploy the eShopOnWeb sample to an Azure App Service, starting in the Azure Portal, follow these step-by-step instructions (or, deploy to Azure directly from from Visual Studio):

Create and Configure the Azure Web App

  1. Clone or download the eShopOnWeb sample to a folder on your local machine.

  2. Log in to the Azure Portal with your Microsoft Account.

  3. Select the “+ Create resource” either for the portal home page or under the hamburger menu (≡).

    Azure portal - showing "+ Create resource" on the Home page as well as under the hamburger menu.

  4. Select Web App.

    Azure marketplace of Azure services and apps. Web App is highlighted.

  5. On the Create Web App screen, in the Project Details section, choose a subscription. Then choose a new resource group name or select an existing one, then select Review + create.

    For the Instance Details, enter a name for the web app. Select Publish as Code. Select .NET 9 for the Runtime stack. Then, select Windows for the Operating System. Select an appropriate Region.

    In Pricing plans, select an appropriate pricing plan.

    Then, select Review + Create. Then, select Create.

In a few moments you should see that the deployment was successful.

image

Download Publish Profile

  1. Once the deployment succeeds, go to the new web app.

  2. Select Download publish profile.

    image

    Note: This may complain that you cannot download the file because basic authentication is disabled. Under Settings > Configuration > General Settings, you may need to turn On for both SCM Basic Auth Publishing Credentials and FTP Basic Auth Publishing Credentials. If you change these settings, then Restart the web app before trying to download the publish profile. Learn more about disabling Basic Authentication.

  3. Copy the downloaded .PublishSettings file to the eShopOnWeb/src/Web folder.

    image

  4. Open the eShopOnWeb.sln solution file.

  5. Right-click on the Web project and select Publish.

  6. Select + New profile. In the Publish dialog, on the Target step, select Import Profile. Select Next.

    image

  7. Select the .PublishSettings file you saved in the eShopOnWeb/src/Web folder.

  8. Make sure the fromportal publish profile is selected. Then, Click Publish.

    You should see files being copied. When the publish process completes, the site should open in your browser.

Update Azure App Settings’ Environment Variables

In order to populate the seed data, we need to set the ASPNETCORE_ENVIRONMENT variable to Development. (Note: This is not the same as Debug vs. Release configuration). The sample data is only seeded in the Development environment. This is only needed if you are working in development. You can configure the App Service to run in Development as follows:

  1. In the Azure Portal, navigate to your Web App.

  2. Select Settings > Environment Variables.

  3. In the App settings section, add a new key ASPNETCORE_ENVIRONMENT with value Development.

  4. Select Apply.

  5. Add another key for UseOnlyInMemoryDatabase with the value of true.

  6. Select Apply.

    Add the ASPNETCORE_ENVIRONMENT variable in the Azure Portal.

  7. Finally, select Apply to apply all of these changes to the App Service.

At this point, you should be able to refresh the site and see it loaded with data (if not, publish once more from Visual Studio).

eShopOnWeb portal logged in as the demouser and shown running on the resource we created in this demo.

Learn more about Azure deployment options in the official documentation.