简体   繁体   中英

Azure AppService set environment for Blazor application?

I want to deploy a Blazor application (Web assembly) to Azure App Service.

I want to set the environment of the Azure App Service to Development.

I try setting this to Development.

在此处输入图像描述

However after the deployment, it's saying Environment: Production.

在此处输入图像描述

Homepage.razor:

@using Microsoft.AspNetCore.Components.WebAssembly.Hosting
@inject IWebAssemblyHostEnvironment HostEnvironment

<PageTitle>Index</PageTitle>

<p>Environment: @HostEnvironment.Environment</p>

Please anyone can suggest on how to set the Environment on Azure App Service to Development, not default as Production.

Thanks very much.

The default deployment slot in Azure App Service is the production one. You'll need to setup slots specifically for development or other environments ('staging' is more commonly used). See the Azure App Service documentation for setting up staging environments for more information.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM