HttpContext.Current.Error.InnerException总是返回空值,但我得到的是HttpContext.Current.Error和Server.GetLastError()中的值。
我的web.config文件是
<customErrors mode="RemoteOnly" defaultRedirect="~/Error.aspx" redirectMode="ResponseRewrite" />发布于 2012-12-07 17:36:51
可能只是因为没有内部异常。
描述导致当前异常的错误的exception实例。InnerException属性返回与传递到构造函数中的值相同的值;如果内部异常值未提供给构造函数,则返回空值引用(在Visual Basic中为Nothing
http://msdn.microsoft.com/en-us/library/system.exception.innerexception%28v=vs.100%29.aspx
https://stackoverflow.com/questions/13760341
复制相似问题