Write the following code in global.asax file
protected void Application_Error(Object sender, EventArgs e)
{
Exception ex = Server.GetLastError();
if (ex is ThreadAbortException)
return;
Logger.Error(LoggerType.Global, ex, "Exception");
Response.Redirect("unexpectederror.htm");
}
Click here for Reference Page
No comments:
Post a Comment