vb.net - custom error page endless loop in asp.net -
Pure with ASP.NET in Visual Studio. I am trying to apply a custom error page to use this code -
& lt; CustomErrors mode = "RemoteOnly" defaultRedirect = "~ / ErrorPages / errorPage.aspx" & gt; & Lt; Error status code = "404" redirect = "~ / ErrorPages / NotFound.aspx" /> & Lt; / CustomErrors & gt;
And I created error pages. I am also global. Found on the Essex page -
Sub application_Error (as an object, in the form of ByVal and EventArgs) new multi-functions functions as sent mail classes (Dim Dimjre) like SystemException = Server.GetLastError ( ). GetBaseException () Dim errorContent string = error message code mailClass.sendMail (errorContent, "user error information", "mail address", "nothing") end sub
I I get the error message in my mail ->
Now it is my problem: when I am killing an error, for example bad URL type and redirect can not be redirected to error page, a In the endless loop? It does not matter that I click on the website that is not going to other pages on that page.
Can I have something like this?
This should be seen when the URL on the error page is not correct. You receive 404, and then you try to go to a bad url for the error page, which in turn trigger another 404, which tries to redirect to a bad url ... ad infinite .
Try browsing on your error page and make sure you have the URL correct in your config settings.
Comments
Post a Comment