Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Preventing Custom Error page passing the querystring "aspxerrorpath=" ?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 1.25k
    Comment on it

    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)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: