Deploying website: 500 - Internal server error

2018-12-31 03:36发布

I am trying to deploy an ASP.NET application. I have deployed the site to IIS, but when visiting it with the browser, it shows me this:

Server Error

500 - Internal server error.

There is a problem with the resource you are looking for, and it cannot be displayed.

After fiddling around with the web.config, I got:

The page cannot be displayed because an internal server error has occurred.

How can I see the actual issue behind this server error?

20条回答
若你有天会懂
2楼-- · 2018-12-31 04:22

IIS also reports status code 500 without any event log hints if there are insufficient permissions on the physical home directory (i.e. IIS_IUSRS has no access).

查看更多
荒废的爱情
3楼-- · 2018-12-31 04:22

Make sure your account uses IIS 7. For more information, see Customizing IIS Settings on Your Windows Hosting Account. Follow the instructions in Changing Pipeline Mode on Your Windows IIS 7 Hosting Account. Select Integrated Pipeline Mode. In your Project References section, set Copy Local to True for the following assemblies:

System.Web.Abstractions
System.Web.Helpers
System.Web.Routing
System.Web.Mvc
System.Web.WebPages

Add the following assemblies to your project, and then set Copy Local to True:

Microsoft.Web.Infrastructure
System.Web.Razor
System.Web.WebPages.Deployment
System.Web.WebPages.Razor
Publish your application.
查看更多
登录 后发表回答