public static FileNotFoundExceptionHandler ( object sender, |
||
sender | object | |
e | ||
return | void |
public static void FileNotFoundExceptionHandler(object sender, EventArgs e)
{
HttpContext context = GetContext();
if (context == null)
return;
if (CheckForException(context, context.Request.Url))
{
context.Response.Clear();
context.Response.TrySkipIisCustomErrors = true;
context.Server.ClearError();
context.Response.StatusCode = 404;
}
}