ASP.NET Core hosting environment variable ignored

前端 未结 5 740
梦毁少年i
梦毁少年i 2020-12-31 03:20

I have two web sites on my staging server, and both are ASP.NET Core sites that run in IIS. I have set the environment variable ASPNETCORE_ENVIRONMENT to

5条回答
  •  醉酒成梦
    2020-12-31 04:04

    If you are debugging your code in Visual Studio, bear in mind that Visual Studio caches the environment variables that were present when Visual Studio was started - not when you hit "debug"!

    So you may have to restart Visual Studio for any changes to the environment to be visible.

提交回复
热议问题