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
Asked Answered
L

2

6

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?

Lot answered 26/1, 2016 at 12:7 Comment(2)
Which version of IIS Express do you use? It is usually a command for full IIS.Hermosa
Let me know if you get any solution, here's my post with some more homework - #40176535Spickandspan
S
5

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.

Spickandspan answered 22/10, 2016 at 9:40 Comment(0)
P
4

you should change your web.config with the following:

<system.webServer>
<validation validateIntegratedModeConfiguration="false" /> 
</system.webServer>
Pamphleteer answered 19/4, 2018 at 17:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.