VB.Net – Catching errors in Global.asax

 Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)

        Dim ex = Context.Server.GetLastError
        HttpContext.Current.Response(ex.ToString())

End Sub

Leave a Comment

Your email address will not be published. Required fields are marked *