Application_Error는 통합 모드에서는 작동하지 않지만 클래스 모드에서는 작동합니다. 통합 모드와 클래스 모드를 모두 사용하여 오류 페이지로 요청을 전송하고 싶습니다. 이 작업을 수행 할 수 있습니까 아니면 둘 다 모드를 지원하기 위해 HTTP 모듈을 사용해야합니까?Global.asax Application_Error가 통합 모드에서 작동하지 않습니다.
protected void Application_Error(object sender, EventArgs e)
{
if (Context != null && Context.IsCustomErrorEnabled)
{
Server.Transfer("~/Error.aspx", false);
}
}
http://weblogs.asp.net/reganschroder/archive/2008/07/25/iis7-integrated-mode-request-is-not-available-in-this-context-exception-in-application-start .aspx – user81740
IIS 7.0의 ASP.NET 응용 프로그램 수명주기 http://msdn.microsoft.com/en-us/library/bb470252.aspx – user81740
오류를 처리 할 HTTP 모듈을 작성할 수 있습니다. 이 질문과 대답 : http://msmvps.com/blogs/vcsjones/archive/2008/12/26/managing-iis-pipeline-mode-for-backward-compatibility.aspx – user81740