“出现了意外的服务器错误” - IIS Version 7.5

时间:2016-11-10 23:41:53

标签: c# asp.net deployment iis-7.5

enter image description here

我开发了一个Web应用程序,我在服务器上部署了这个应用程序 当我运行应用程序时,我收到There was an unexpected server error,这只是它显示的错误消息,没有其他详细信息 当我使用visual studio运行此应用程序时,它工作得很好。我试过<customErrors mode="On" />以下

  • 应用程序池已保存在.net 4.0版
  • Asp.net已在IIS注册。

任何想法都会有所帮助。

2 个答案:

答案 0 :(得分:0)

服务器web.config上的

尝试下面的配置。你应该看到详细的错误信息。

<system.web>
    <customErrors mode="Off" />
</system.web>
<system.webServer>
    <httpErrors errorMode="Detailed"></httpErrors>
</system.webServer>

答案 1 :(得分:0)

There was a network issue, which has been fixed, and it worked. Asp.net Impersonation has been "Enabled", Anonymous Authentication has been "Disabled". Enabled delegation [for kerberos] for the machine at the AD level. These made application work. There was no code issue at all as expected.