Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

02. Deploying to Azure App Service from Azure Portal

Steve Smith edited this page Jun 4, 2019 · 3 revisions

Deploying to Azure App Service

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):

  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. Click the + icon, then select Web App. Provide an App name.

image

  1. Choose a new resource group name or select an existing one, then click Create. In a few moments you should see that the deployment was successful.

image

  1. Select Get publish profile.

image

  1. Copy the .PublishSettings file to the eShopOnWeb/src/Web folder.

image

  1. Open the eShopOnWeb.sln solution file.

  2. Right-click on the Web project and select Publish. Select Import profile. Click OK.

image

  1. Select the .PublishSettings file you saved in the eShopOnWeb/src/Web folder. You should see something like this:

image

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

Optional

If you are not seeing data initially in the store, the most likely reason is that the Azure App Service is configured for Production, not Development (Note: This is not the same as Debug vs. Release configuration). The sample data is only seeded in the Development environment. You can configure the App Service to run in Development as follows:

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

  2. Click Application settings.

  3. Scroll down to App settings.

  4. Add a new key ASPNETCORE_ENVIRONMENT with value Development.

  5. Click Save.

image

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).

image

Clone this wiki locally