title: A potentially dangerous Request in asp.net 4
body: <p>I'm getting the following error in ASP NET 4: </p>
  
  <pre><code>A potentially dangerous Request.Path value was detected from the client (&lt;).
  </code></pre>
  
  <p>I have read that I need to use requestValidationMode="2.0" in my Web.config:</p>
  
  <pre><code>&lt;system.web&gt;
      &lt;compilation debug="true" targetFramework="4.0" /&gt;
      &lt;httpRuntime requestValidationMode="2.0" /&gt;
  &lt;/system.web&gt;
  </code></pre>
  
  <p>So my method looks like:</p>
  
  <pre><code>[ValidateInput(false)]
  public ActionResult Search(string query, string type){
  
  //method body
  
  return result;
  }
  </code></pre>
  
  <p>It works great. However, I cannot modify my Web.config file because many other applications rely on this file and it may cause a security vulnerability or an error somewhere else. </p>
  
  <p>My application is secure enough to accept special characters, but I cannot say the same for the rest of the system being developed.
  Is there an alternative to accept special characters as input in my method? </p>
  
  <p>Example:</p>
  
  <pre><code>www.mydomain.com/search/query/&lt;myquery&lt;ffoo/type/dept
  </code></pre>