How to fix HTTP Error 500.22 - Internal Server Error An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode

13,202

Solution 1

Chk my SO Post

Finally, I'm able to crack it for VS.Net 2015 and its configuration of IISExpress. ITs not possible to configure it 'externally' and nothing will work if you keep modifying IIS or IISExpress settings outside VS.Net.

It took me a while to narrow down my focus to VS.Net proj properties and configurations. I found that VS.Net created its own version of "applicationhost.config" which can be found at -

<myProject.sln path> \.vs\config\applicationhost.config

This is the file in which I had to change the application pool (applicationPool="Clr4ClassicAppPool) -

    <sites>
        <site name="WebSite1" ... ignore this sction if present
        </site>
        <site name="myProject" id="2">
            <application path="/" applicationPool="Clr4ClassicAppPool">
                <virtualDirectory path="/" physicalPath="D:\Source\myProject" />
            </application>
            <bindings>
                <binding protocol="http" bindingInformation="*:1960:localhost" />
            </bindings>
        </site>

You just need to change the applicationPool (your Classic App pool name might be diff in that case get the correct one from in the same file). Also make sure you're updating the correct "site" node (the correct localhost url of your web app when debugged from VS.Net)

If still there's an issue set the following -

<applicationDefaults applicationPool="Clr4IntegratedAppPool" />

Hope this helps.

Solution 2

you should change your web.config with the following:

<system.webServer>
<validation validateIntegratedModeConfiguration="false" /> 
</system.webServer>
Share:
13,202
Zet
Author by

Zet

Updated on July 13, 2022

Comments

  • Zet
    Zet almost 2 years

    I'm learnig about Http modules and during last try I received:

    HTTP Error 500.22 - Internal Server Error An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.

    One of the suggested solution is:

    from the IIS Express install directory, run appcmd migrate config "Default Web Site/".

    So from Command prompt I went to C\Program Files\IIS Express and then I executed: appcmd migrate config "Default Web Site/"

    I received command "Migrate" is not supported on object config.

    How to do it properly?