Home > Enterprise >  Where is the Environment (Development, Production, etc) set in Azure?
Where is the Environment (Development, Production, etc) set in Azure?

Time:04-13

We have two subscriptions setup in Azure, one intended for Dev and Testing and another for the live Production hosting. I have an app service deployed to each that I created a simple API method to return the current environment from the IWebHostEnvironment, just returns:

env.EnvironmentName

But in each case the value returned is 'Production'.

Where in Azure do I set the DEV subscription to be env = Development?

thanks

CodePudding user response:

You should be able to set it as an environment variable by going to: Configuration -> Application Settings. Set the Name to ASPNETCORE_ENVIRONMENT and value to anything you like such as DEVELOPMENT.

  • Related