I want to handle the excptions in my application. So I put the in Application_Error inside Global.asax file. My problem is on crash the debugger is not coming to it. Am i missing something in web.config. Below is the application_error method
void Application_Error(object sender, EventArgs e)
{
// Code that runs when an unhandled error occurs
string ErrorDescription = Server.GetLastError().ToString();
//Creation of event log if it does not exist
string EventLogName = "ErrorSample";
if ((!EventLog.SourceExists(EventLogName)))
{
EventLog.CreateEventSource(EventLogName, EventLogName);
}
// Inserting into event log
EventLog Log = new EventLog();
Log.Source = EventLogName;
Log.WriteEntry(ErrorDescription, EventLogEntryType.Error);
MailMessage mai ...
Go to the complete details ...