title: How to disable request validation in ASP.NET MVC, IIS Express
body: <p>.Net Framework 4.5.2, Visual Studio 2015, IIS Express</p>
  
  <p>I want to send requests like <code>http://localhost:49974/xxx/xml/&lt;a&gt;&lt;b&gt;&lt;/b&gt;&lt;/a&gt;</code> to my application. This results in a server error and the message: <code>A potentially dangerous Request.Path value was detected from the client (="/xxx/xml/&lt;a&gt;&lt;b&gt;&lt;/b&gt;&lt;/a&gt;").</code></p>
  
  <p>Following the instructions from <a href="https://msdn.microsoft.com/en-us/library/hh882339(v=vs.110).aspx" rel="nofollow">MSDN</a> I have set <code>requestValidationMode="2.0"</code>:</p>
  
  <pre><code>&lt;system.web&gt;
    &lt;httpRuntime requestValidationMode="2.0" targetFramework="4.5.2" /&gt;
  &lt;/system.web&gt;
  </code></pre>
  
  <p>And and added <code>[ValidateInput(false)]</code> to cotrtoller's action:</p>
  
  <pre><code>[ValidateInput(false)]
  public ActionResult Xml()
  {
      return View("../Home/Index");
  }
  </code></pre>
  
  <p>However I still get exactly the same error on the request presented above.</p>