The ASP website application modifies the web.config configuration file settings to disable the authentication integration mode

When porting an ASP.NET program from IIS6 to IIS7 (or running it in an ide environment such as VS2017), the following error may be prompted when running:

HTTP Error 500.23 - Internal Server Error

An ASP.NET setting was detected that does not apply in Integrated Managed Pipeline mode.

The application pool in IIS7 has two modes, one is "integrated mode" and the other is "classic mode".

Classic mode is the IIS 6 way we're used to.

If you use the integrated mode, you need to modify the configuration file for the custom httpModules and httpHandlers, and need to transfer them to the <modules> and <hanlders> sections.

Two solutions: 

1. Deploy in IIS: configure the application pool.

Configure the application pool on IIS7, and change the mode of the application pool to "classic", then everything works fine.

  2. Modify the web.config configuration file

  <system.web>
    <!--other configuration of web node (omitted)-->
  </system.web>
  <system.webServer>
    <!--other configuration of webServer node (omitted)-->
    <!--setting prohibited Validate integrated mode (validateIntegrateModeConfiguration="false") -->
    <validation validateIntegratedModeConfiguration="false" />
  </system.webServer>

That is, add the <validation validateIntegratedModeConfiguration="false" /> node in system.webServer, as described in the above code snippet. 

Guess you like

Origin blog.csdn.net/u014698745/article/details/100666469