title: How do I disable request validation without setting RequestValidationMode to 2.0?
body: <p>We've just upgraded to ASP.NET 4.0, and found that requestValidation no longer works. The MSDN docs suggest we need to set <a href="http://msdn.microsoft.com/en-us/library/system.web.configuration.httpruntimesection.requestvalidationmode.aspx">requestValidationMode</a> in web.config to 2.0:</p>
  
  <blockquote>
    <ul>
    <li>4.0 (the default). The HttpRequest object internally sets a flag that indicates that request validation should be triggered whenever
    any HTTP request data is accessed. This guarantees that the request
    validation is triggered before data such as cookies and URLs are
    accessed during the request. The request validation settings of the
    pages element (if any) in the configuration file or of the @ Page
    directive in an individual page are ignored.</li>
    <li>2.0. Request validation is enabled only for pages, not for all HTTP requests. In addition, the request validation settings of the pages
    element (if any) in the configuration file or of the @ Page directive
    in an individual page are used to determine which page requests to
    validate.</li>
    </ul>
  </blockquote>
  
  <p>This will work for us, however I'm a little puzzled. It seems that we're putting this into a legacy/compatibility mode. Surely it should be possible to have the 4.0 behaviour, but still have an option to turn this off on a page?</p>