Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 15671

Blazor Server: Can't change ASPNETCORE_ENVIRONMENT

$
0
0

I have a Blazor Server application with a set of custom environment variables, I am trying to set the environment into DevelopmentLocal on the web.config file, however It stays on the Development environment

This is the list of appsettings.json

List of appsettings

Program.cs

...Console.WriteLine($"This application is running on the environment: {app.Environment.EnvironmentName}");// Output: This application is running on the environment: Development// Expected: This application is running on the environment: DevelopmentLocal...

web.config

...<environmentVariables><environmentVariable name="ASPNETCORE_ENVIRONMENT" value="DevelopmentLocal"/></environmentVariables>...

Viewing all articles
Browse latest Browse all 15671

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>