title: IISExpress VS.Net 2015 - HTTP Error 500.22 - An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode
body: <p>I've an <strong>ASP.NET MVC5 web app</strong> on my local Win 10 machine. Recently, I upgraded some Nuget packages and MVC4 to MVC5. And updated the target framework version to .Net v4.5.</p>
  
  <p>Now, when I <em>debug the web app from local VS.Net 2015 Community version</em> I get the following error -</p>
  
  <blockquote>
    <p>HTTP Error 500.22 - Internal Server Error An ASP.NET setting has been
    detected that does not apply in Integrated managed pipeline mode.</p>
  </blockquote>
  
  <p>Most threads I found were for IIS I'm talking about IISExpress. They suggested to change the web app's App Pool to a Classic in IIS (<a href="https://stackoverflow.com/questions/7370513">Post1</a>, <a href="https://stackoverflow.com/questions/35013500">Post2</a>, <a href="https://stackoverflow.com/questions/4209999">Post3</a>). But <strong>VS.Net uses IISExpress</strong> so I went deeper into that as well and located - C:\Users\\Documents\IISExpress\config\applicationhost.config. Tried to edit it but it would allow me to configure only one WebSite1 which is localhost:8080 and mine runs as localhost:1960.</p>
  
  <p>I've also tried the <strong>appcmd</strong> commandline approach but unless I've a website 'localhost:1960' there seems no way. I also sought an IISExpress UI tool <a href="https://jexus.codeplex.com/downloads/get/932006" rel="nofollow noreferrer">Jexus</a> but my 'localhost:1960' website is not listed.</p>
  
  <p>Apparently, setting </p>
  
  <blockquote>
    <p>&lt;validation validateIntegratedModeConfiguration="false" /> in
    web.config</p>
  </blockquote>
  
  <p>fixes it. But its not the best solution. And I can't remove httpHandlers or modules from my web.config.</p>
  
  <p>I need to know how to manipulate the <strong>IISExpress</strong> that is invoked by VS.Net 2015 while debugging. <strong>Not IIS</strong>.</p>
  
  <p>Thank you.</p>