I have ASP.NET core web application. I have configured the web application on our web server and set the ASPNETCORE_ENVIRONMENT
variable to Development
. I set this variable at machine level like shown in the picture below.
Now on the same machine i want to configured one more instance of same web application as Staging
environment.
What are my options here to set ASPNETCORE_ENVIRONMENT
at application level instead of machine level? so i can host multiple instances of the same application on the same machine?
You have a couple of options.
Run each app as a different user, and set the environment variable within that user profile. This gives you a nice added security bonus. You'll have to set the app pool to load the user profile.
Use IIS configuration