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

做~自己de王妃 提交于 2019-12-22 05:29:41

问题


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?


回答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.




回答2:


you should change your web.config with the following:

<system.webServer>
<validation validateIntegratedModeConfiguration="false" /> 
</system.webServer>


来源:https://stackoverflow.com/questions/35013500/how-to-fix-http-error-500-22-internal-server-error-an-asp-net-setting-has-been

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!