Hii all...
While working with Custom Error pages I found that Custom error page usually returns the path of the error causing page in the querystring called "aspxerrorpath".
To prevent aspxerrorpath passed as a query string in asp.net error pages to custom error page, just add this code in the web.config file:-
<security>
<requestFiltering>
<denyQueryStringSequences>
<add sequence="aspxerrorpath=" />
</denyQueryStringSequences>
</requestFiltering>
</security>
Or simply we can set it in IIS, in "Request Filtering" option. Add "Deny" rule for querystring "aspxerrorpath="
Happy Coding...! :)
0 Comment(s)