Hello, a Blazor Server Project which runs on a Azure WebApp with KeyVault Secret. But there is an ASPNETCORE_ENVIRONMENT ERROR which says set the ASPNETCORE_ENVIRONMENT to Development, but it is already set to Development!
The error is just on the public Azure version, the loccalhost version works fine!
Any idee what to config.
launchSettings.json is only used in Visual Studio and not deployed.
Typically, configuring the environment is designed into your application well before deployment. I think you'll be interested in reading the standard docs to find an approach that works best for your design.
Blazor WASM environment
You can update the deployed web.config to set the environment variable if this is a Blazor Server application.
<aspNetCore processPath=".\MyApplication.exe" arguments="" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false"> <environmentVariables> <environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" /> </environmentVariables> </aspNetCore>
<httpProtocol> <customHeaders> <add name="blazor-environment" value="Development" /> </customHeaders> </httpProtocol> </system.webServer> </configuration>
Sign in to comment