Setting environment variables for asp.net core when publishing on IIS

From Logic Wiki
Jump to: navigation, search


  • Open the IIS Manager and select your website
  • Open “Configuration Editor” from “Management” section

Iis1.png

  • On the first dropdown (section), select “system.webServer/aspNetCore”
  • On the second (from), select web.config

Iis2.png

  • Then select “environmentVariables”, click on the “…” and use the add/remove buttons to configure as you want.

(ASPNETCORE_ENVIRONMENT is the appsettings.json environments)


Iis4.png