[C#]/// Email any untrapped errors with error details private void Application_Error(object sender, System.EventArgs e) { string strErrorMsg = "CSF Application Error\n\n"; // Get the path of the page strErrorMsg += "Error in Path :" + Request.Path; // Get the
QueryString along with the Virtual Path strErrorMsg += "\n\n Error Raw Url :" + Request.RawUrl; // Create an Exception object from the Last error that occurred on the server Exception myError =Server.GetLastError(); // Get the error message strErrorMsg +=
"\n\nError Message :" + myError.Message; // Source of the message strErrorMsg += "\n\nError Source :" + myError.Source; // Stack Trace of the error strErrorMsg += "\n\nError Stack Trace :" + myError.StackTrace; // Method where the error occurred strErrorMsg
+= "\n\nError TargetSite :" + myError.TargetSite; // Email Error string strEmail = "sample123@email123.com"; SendMail(strEmail,strEmail, "CSF Error", strErrorMsg); }[/C#]
nberardi
Star
11233 Points
2352 Posts
Re: Convert array in a string...
Aug 08, 2003 08:59 PM|LINK