protected void Application_Error(object sender, EventArgs e) { var ex = Server.GetLastError().GetBaseException(); var errorHandlingSerivce = new ErrorHandlingService(); errorHandlingSerivce.LogToErrorTable(ex, Request.RawUrl); errorHandlingSerivce.LogToErrorLog(ex, Request.RawUrl); errorHandlingSerivce.LogToEventViewer(ex, Request.Url.AbsoluteUri, Request.QueryString.ToString()); }