I have an asp.net web application located on a server. I want to avoid all user and server errors from my site.
For this I used
<customErrors mode="RemoteOnly" defaultRedirect="~/ErrorPage/TryAgainLater.aspx"> <error redirect="~/ErrorPage/PageNotFound.aspx" statusCode="404"/> </customErrors>
Using the above code will avoid some problems. i.e.
Suppose the page "http://Exaple.com/Careers.aspx" is available on my site, and then
Case 1. http://Exaple.com/Careersss.aspx "It worked correctly in accordance with the rule above."
Case 2. http://Exaple.com/!@##Careersss.aspx "Not working" Note: here I add a special character
Case 3: http://Exaple.com/Careersss.aspxxxx "Doesn't work" Note: Add a character after ".aspx"
case 4: http://Exaple.com/Careersss.aspx/!@!@!@ ! "Design of works does not work here." Note. Add '/' with a special character.
please help me when the user receives the case 2,3,4, then they are automatically redirected to the error page.
Thanks in advance.
Yashwant Kumar Sahu
source share