这是可能的重写.NET Framework错误:
Server Error in '/' Application. Runtime Error Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine. ... <!-- Web.Config Configuration File --> <configuration> <system.web> <customErrors mode="Off"/> </system.web> </configuration>
即使web.config(IIS7.5)设置为
<httpErrors errorMode="Detailed"/>
? 我问,因为我的IIS7的默认设置是
<deployment retail="true" />
所以没有错误显示,只有在网站上添加额外的error handling模块将允许看到这个应用程序产生的错误,这就是为什么我想覆盖这个消息通知用户。
有任何想法吗?
谢谢
这是我的观察。 如果您在IIS 7.5中configurationhttpErrors,则错误消息针对非.net页面,即.htm,.asp,.css。 如果要在IIS 7.5中configurationcustomError消息,则需要在IIS 7.5中的“.NET错误页面”部分中进行configuration。 检查我的博客文章你知道吗:在IIS 7.5中启用自定义错误(.NET错误页面) – 第4部分
使用<deployment retail="true" /> ,configuration将在system.web上生效,而不在system.webServer上生效,因此httpErrors不会受到影响。
有人,纠正我,如果我错了。