Deploying to Azure App Service from Azure Portal
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):
-
Clone or download the eShopOnWeb sample to a folder on your local machine.
-
Log in to the Azure Portal with your Microsoft Account.
-
Click the + icon, then select
Web App
. Provide anApp name
. -
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. -
Select
Get publish profile
. -
Copy the
.PublishSettings
file to theeShopOnWeb/src/Web
folder. -
Open the
eShopOnWeb.sln
solution file. -
Right-click on the
Web
project and selectPublish
. SelectImport profile
. ClickOK
. -
Select the
.PublishSettings
file you saved in theeShopOnWeb/src/Web
folder. You should see something like this: -
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:
-
In the Azure Portal, navigate to your Web App.
-
Click
Application settings
. -
Scroll down to
App settings
. -
Add a new key
ASPNETCORE_ENVIRONMENT
with valueDevelopment
. -
Click
Save
.
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).