憑證錯誤畫面
-
2009年9月2日 上午 01:37我想請問在憑證錯誤時會出現custom error
請問有辨法可以修改custom error page嗎
或是在發生錯誤時有觸發任何事件
謝謝
所有回覆
-
2009年9月2日 上午 01:32我想請問在憑證錯誤時會出現custom error
請問有辨法可以修改custom error page嗎
或是在發生錯誤時有觸發任何事件
謝謝- 已合併 KeFang ChenModerator 2009年9月3日 上午 02:02 重复发帖
-
2009年9月3日 上午 02:01版主
你好,
你可以在web.config中进行如下配置,以指定出错后转向的页面。
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm"> <error statusCode="403" redirect="NoAccess.htm" /> <error statusCode="404" redirect="FileNotFound.htm" /> </customErrors>其次你也可以在global文件中添加Application_Error处理方法。
void Application_Error(object sender, EventArgs e) { Response.Write(((System.Web.HttpApplication)(sender)).Context.Error.StackTrace); }
Microsoft Online Community Support- 已標示為解答 KeFang ChenModerator 2009年9月8日 上午 08:13