Setting environment variables for asp.net core when publishing on IIS
From Logic Wiki
- Open the IIS Manager and select your website
- Open “Configuration Editor” from “Management” section
- On the first dropdown (section), select “system.webServer/aspNetCore”
- On the second (from), select web.config
- Then select “environmentVariables”, click on the “…” and use the add/remove buttons to configure as you want.
(ASPNETCORE_ENVIRONMENT is the appsettings.json environments)


