© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
1 reply
Davide Dunne

Blazor Server

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

Program.cs
Program.cs

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

web.config
web.config

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

This is the list of
appsettings.json
appsettings.json
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Hosting Blazor Server
C#CC# / help
14mo ago
Blazor Wasm with blazor server or API
C#CC# / help
3y ago
Blazor windows forms server
C#CC# / help
12mo ago