Errors Errors Errors
We would always prefer to avoid all errors but if one happens we certainly want to know about it. Adding an error handler to the Global.asax file is slick - easy and works beautifully..... here is what you need: Sub Application_Error( ByVal sender As Object , ByVal e As EventArgs) Try Dim strFrom As String = System.Configuration.ConfigurationManager.AppSettings( "EmailFrom" ) Dim strTo As String = System.Configuration.ConfigurationManager.AppSettings( "EmailTo" ) Dim msg As System.Net.Mail.MailMessage Dim smtp As New System.Net.Mail.SmtpClient( " mail.yourmailserver.com " ) msg = New System.Net.Mail.MailMessage(strFrom, strTo, "Page Error My Application Name" , BuildMessage()) msg.IsBodyHtml = True smtp.Credentials = New System.Net.NetworkCredential( "Username" , "password" , " mail.myserver.com " ) smtp.Send(msg) Catch ex As Exception End Try End Sub The buildMessage Function in the global.asax...