问题
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