ASP.NET Core hosting environment variable ignored

前端 未结 5 739
梦毁少年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:12

    From a cmd window, run net stop /y was && net start w3svc.

    Source: ASP.NET Core Docs -> Use multiple environments in ASP.NET Core


    Note: Restarting IIS via right click-> stop -> start in IIS Manager will NOT work.

提交回复
热议问题