Mega Code Archive

 
Categories / ASP.Net Tutorial / Development
 

Application-level error handling

Protected Sub Application_Error(sender as Object, ByVal e  As System.EventArgs)     Dim bigError As System.Exception = Server.GetLastError()     If (TypeOf AnError.GetBaseException() Is HttpRequestValidationException) Then         System.Diagnostics.Trace.WriteLine(bigError.ToString)         Server.ClearError()     End If End Sub