void Application_Error(object sender, EventArgs e)
{
Exception exception = Server.GetLastError();
try
{
HttpException httpException = (HttpException) exception;
int httpCode = httpException.GetHttpCode();
switch (httpCode)
{
case 403: Response.Redirect("~/Pages/Error/NoAccess.aspx");break;
case 404: Response.Redirect("~/Pages/Error/PageNotFound.aspx");break;
default: Response.Redirect("~/Pages/Error/Generic.aspx");break;
}
}
catch {}
Server.ClearError();
}
Thursday, September 4, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment