Wednesday, May 6, 2009

Global.ASAX Error handler to know which file is missing

Write the following code in your Global Error handler to know which file is missing.
void Application_Error(object sender, EventArgs e)
{
String FileName = HttpContext.Current.Request.Url.ToString();
String RequestFrom = HttpContext.Current.Request.UrlReferrer.ToString();.....
}

Put a breakpoint at first line and check the value of FileName to know which file is missing.

No comments: