Hi
Here's my problem I have some code and I'm using it to send an e-mail with the last error details but all I want is the (Inner)Exception Message to be displayed in the email with the URL
Here's my code
Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
' Get current exception
Dim err As System.Exception = Server.GetLastError
Dim ErrorDetails As String = err.Exception.Message
Dim ErrorURL As String = Request.Url.ToString()
' Send notification e-mail
Dim Email As MailMessage = _
New MailMessage("[email protected]", [email protected]")
Email.IsBodyHtml = False
Email.Subject = "WEB SITE ERROR"
Email.Body = ErrorDetails & vbcrlf & vbcrlf & ErrorURL
Email.Priority = MailPriority.High
Dim sc As SmtpClient = New SmtpClient("localhost")
sc.Send(Email)
End Sub
Any help would be much appreciated
Thanks
Jamie