-
Notifications
You must be signed in to change notification settings - Fork 5.6k
02. Deploying to Azure App Service from Azure Portal
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 selectWeb 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.
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).
- Getting Started for Beginners (with video)
-
Walkthroughs
- Deploying to Azure App Service from Visual Studio
- Deploying to Azure App Service from Azure Portal
- Deploying to Azure App Service from Visual Studio for Mac
- Running as a Linux Container locally in Visual Studio
- Deploying as a Linux Container into Azure App Service
- Running in a Windows Container locally in Visual Studio
- Running as a Linux Container locally in Visual Studio for Mac
- Deploying as a Windows Container into a Windows Container host in Azure
- Working with the Project and Adding New Features using Visual Studio for Mac