D
Daniel Groh
Hi, I have this code in my Application_Error:
protected void Application_Error(Object sender, EventArgs e)
{
Exception ex = Context.Error.GetBaseException();
string msgErro = ex.Message + " - " + ex.StackTrace;
if(!EventLog.SourceExists("BooksOnline"))
{
EventLog.CreateEventSource("BooksOnline","BooksOnline Log");
}
System.Web.Mail.SmtpMail.SmtpServer = "localhost";
System.Web.Mail.SmtpMail.Send("(e-mail address removed)",
"(e-mail address removed)",
"Application Error",
ex.Message);
EventLog.WriteEntry("BooksOnline",msgErro,EventLogEntryType.Error);
}
It does not work...I already tryed the code that is sending email and
everything is running ok, but it is not going to Application_Error, should I
specify something in my web.config ? it's now RemoteOnly!
Thanks in advance
Daniel
protected void Application_Error(Object sender, EventArgs e)
{
Exception ex = Context.Error.GetBaseException();
string msgErro = ex.Message + " - " + ex.StackTrace;
if(!EventLog.SourceExists("BooksOnline"))
{
EventLog.CreateEventSource("BooksOnline","BooksOnline Log");
}
System.Web.Mail.SmtpMail.SmtpServer = "localhost";
System.Web.Mail.SmtpMail.Send("(e-mail address removed)",
"(e-mail address removed)",
"Application Error",
ex.Message);
EventLog.WriteEntry("BooksOnline",msgErro,EventLogEntryType.Error);
}
It does not work...I already tryed the code that is sending email and
everything is running ok, but it is not going to Application_Error, should I
specify something in my web.config ? it's now RemoteOnly!
Thanks in advance
Daniel