R
Ranv
Is it possible to use web.config to handle 404 Page Not Found errors,
and application level custom errors (in global.asax) to handle all
other errors? I suppose I would have to make sure that I don't call
Context.ClearError(); when a 404 Error occurs, but how do I check in
code that this has occured?
What I have right now in global.asax is:
protected void Application_Error(object sender, EventArgs e)
{
Response.Write( Server.GetLastError().ToString() );
Context.ClearError();
}
I've set up web.config to handle 404 errors, but when they occur, the
function in global.asax handles them instead. Hopefuly someone can
help. Thanks in advance.
and application level custom errors (in global.asax) to handle all
other errors? I suppose I would have to make sure that I don't call
Context.ClearError(); when a 404 Error occurs, but how do I check in
code that this has occured?
What I have right now in global.asax is:
protected void Application_Error(object sender, EventArgs e)
{
Response.Write( Server.GetLastError().ToString() );
Context.ClearError();
}
I've set up web.config to handle 404 errors, but when they occur, the
function in global.asax handles them instead. Hopefuly someone can
help. Thanks in advance.