0

I have a web site running .NET 4.8 that defines Application_Error in the Global.asax file. This is used to handle all errors in the application code. When Application_Error is called it uses Server.GetLastError to determine the specific error so it can be handled correctly.

However, when a System.Web.HttpRequestValidationException occurs, Server.GetLastError returns NOTHING.

I would appreciate advice on how to identify this error.

Thanks

Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs) ' Fires when an error occurs Dim WebHack As New Hi.HackInterface

    Call WebHack.WebApplication_Error(Server.GetLastError)
End Sub

System.Web.HttpRequestValidationException occurs, Server.GetLastError returns NOTHING rather than the correct error code.

0 Answers0