void Application_Error(object sender, EventArgs e) { // Code that runs when an unhandled error occurs Exception ex = Server.GetLastError(); System.Diagnostics.StackTrace trace = new System.Diagnostics.StackTrace(ex, true); System.Diagnostics.StackFrame fm = new System.Diagnostics.StackFrame(true); string sline = trace.GetFrame(trace.FrameCount - 1).GetFileLineNumber().ToString(); }
Server.GetLastError()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)