-
Notifications
You must be signed in to change notification settings - Fork 5.6k
01a. Deploying to Azure App Service from Visual Studio
To deploy the eShopOnWeb sample application to an Azure App Service (assuming you've already cloned or downloaded it locally, and you have an Azure account), follow these steps from Visual Studio (see here to start from the Azure Portal):
Leave the option to Create New
selected. Click Publish.
Create a new Resource Group, if desired. You can specify a Free App Service Plan, if desired, as shown.
The Publish profile will be saved and the eShopOnWeb sample will be published to the Azure App Service.
Once the publish process has completed, your deployed app will launch in your browser.
Learn more about Azure deployment options in the official documentation.
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).
- You may need to ensure you have the Bundler and Minifier extension installed in Visual Studio, otherwise your CSS may not be minified and referenced correctly in the deployed version of the application. Alternately, you can modify
_Layout.cshtml
to useapp.css
instead ofapp.css.min
in Production.
- 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