I'm deploying a .NET Core application twice to the same server, once for QA, and once for Production. Currently I have each one of them using a different local user to run the IIS App Pool and have set the ASPNETCORE_ENVIRONMENT variables to "qa" and "production" accordingly.
This doesn't appear to work, both sites run the production configuration which I understand is the default.
Things I've looked at so far:
It just appears that .NET is ignoring the environment variable.
Has anyone else managed to get user level env vars working with a .NET core deployment?
Additional Info: I can set ASPNETCORE_ENVIRONMENT at the system level, and both sites pick it up and run with it. Doing it without a system variable simply doesn't work.
If you want to use user specific environment variables, then the application pool setting LoadUserProfile should be set to true (false is the default),
What exactly happens when I set LoadUserProfile of IIS pool?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With