ASP.NET Core deployment to IIS error: Development environment should not be enabled in deployed applications

后端 未结 8 2247
一个人的身影
一个人的身影 2020-12-02 20:05

I followed this article to deploy my ASP.NET MVC Core 1.0 app to local IIS on my Windows 10 that is using IIS 10. The application deployed successfully and it opens the home

8条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-02 21:03

    First, this error occurs where you publish a web site that raises errors in the run-time. So check your code again in the pages that give this error. Then, set the value of ASPNETCORE_ENVIRONMENT variable to Production (instead of Development), you should also check the layout page and change to . Finally, publish your web site. This is tested in VS2017

提交回复
热议问题