【发布时间】:2013-04-30 03:10:18
【问题描述】:
我正在使用 web.config 中的自定义错误属性来处理自定义错误
像这样:
<customErrors mode="On" defaultRedirect="~/Error.aspx" redirectMode="ResponseRewrite" />
抛出错误后,页面被重定向到错误页面,但是当我访问错误页面中的会话时,它是空的。
我使用 ResponseRewrite 而不是 ResponseRedirect 的原因是因为我使用 elmah 将 Exception id 通过 Items。
我什至尝试创建新的空 asp.net 网站,但它仍然发生。
我见过一些类似的问题,但没有答案。
【问题讨论】:
-
您能添加代码或更多详细信息吗?我没有重现 Visual Studio 2012 IIS 8 中的错误。
-
我正在使用 Visual Studio 2010, iis6
标签: c# asp.net web-config elmah