I have asp.net web application located on server I want to avoid all custom and server error from my site.
For that I have used
<customErrors mode="RemoteOnly" defaultRedirect="~/ErrorPage/TryAgainLater.aspx"> <error redirect="~/ErrorPage/PageNotFound.aspx" statusCode="404"/> </customErrors>
Using above code will able avoid some issue. ie.
Suppose "http://Exaple.com/Careers.aspx" Page available in my site then
Case 1. http://Exaple.com/Careersss.aspx "It was working correct as per above rule".
Case 2. http://Exaple.com/!@##Careersss.aspx "Not working" Note : Here I add special character
Case 3: http://Exaple.com/Careersss.aspxxxx "Not working" Note : add character after ".aspx"
case 4: http://Exaple.com/Careersss.aspx/!@!@!@! "Not works design breaking here". Note : Add '/' with special character.
please help me when user get case 2,3,4 then they automatically redirected to error page.
Thanks In advance.
For above problem we have to change IIS Setting please refer :
http://www.braintrove.com/id/46/page/2#Configure-IIS-for-custom-error-pages
http://blogs.msdn.com/b/webtopics/archive/2008/05/28/iis-7-0-http-error-pages.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With