Background: Today, the company terminal has a function on the exception, reported 500 errors, I use Fiddler to find links, and then open in IE, reported 500.23 error: detected in the integrated managed piping mode does not apply asp.net settings. The background is a IIS7 and TOMCAT7 integrated environment, recorded here.
HTTP Error 500.23-internal Server error
Detects asp.net settings that are not applicable in integrated managed piping mode.
Why are these errors occurring?
There are two modes of application pool in IIS7, one is "Integrated mode" and the other is "Classic mode".
Classic mode is the way we used to be in IIS 6.
If you use Integrated mode, you will need to modify the configuration files for the custom httpmodules and httphandlers, and then transfer them to the <modules> and
Two ways to solve this problem:
The first method, configuring the application pool
Configure the application pool on the IIS7 and change the program pool mode to "classic", after which everything is OK. As shown in figure:
With the iis7.x, but actually only 6 of the functionality, in addition, in some asp.net MVC program effect is not good, so we try the following solutions:
The second method, modify the Web.config configuration file:
Note: Web.config path C:\inetpub\wwwroot\web.config
For example, previous settings (you may not have httpmodules,httphandlers nodes in your environment)
Copy Code code as follows:
<system.web>
............
<add name= "MyModule" type= "Myapp.mymodule"/>
<add path= "*.myh" verb= "Get" type= "Myapp.myhandler"/>
</system.web>
When the IIS7 application pool is integrated mode, change to:
Copy Code code as follows:
<system.web>
...........
</system.web>
<system.webServer>
<modules>
<add name= "MyModule" type= "Myapp.mymodule"/>
</modules>
<add name= "MyHandler" path= "*.myh" verb= "Get" type= "Myapp.myhandler" precondition= "Integratedmode"/>
</system.webServer>
(If your web.config does not have a httpmodules,httphandlers node, add it directly to the node system.webserver:
Copy Code code as follows:
<validation validateintegratedmodeconfiguration= "false"/>
Prohibit validation of integration mode to avoid errors.
Location of IIS Log
Log logs for IIS 6.0 are stored in:
C:\windows\system32\logfiles\
IIS 7 log is stored in:
%systemdrive%\inetpub\logs\logfiles
After my tests, the IIS log is written in real time and does not require IIS reset.
The log writes for IIS 6, 7 are written to different folders in different sites, and the location folder is formatted as "W3svc{siteid}".
In IIS6, the way to view a site ID is to determine it by the name of the folder in IIS log.
In IIS7, in IIS Manager, in Advanced settings, the ID in the general is the site ID, and then you need to use this ID to locate which folder in the LogFiles folder belongs to the site you want to view.
The difference between intergrated and classic
IIS7 's application pools have two kinds of mode, one is integrated, the other is classic. If you use the Integrated mode, you will need to modify the configuration files for the custom httpmodules and httphandlers and transfer them to the <modules> and
What is the difference between the two modes of IIS7 and IIS6?
The modules and handlers of IIS7.0 integrated mode:asp.net are read from <modules> and
IIS7.0 Classic mode: Contrary to the above,,<modules> and
Classic vs Integrated
Classic Mode (theonly mode in IIS6 and below) are a mode where IIS only works with isapiextensions and ISAPI filters Direct Ly. In fact, in this mode, asp.net are justan ISAPI extension (Aspnet_isapi.dll) and an ISAPI filter (Aspnet_filter.dll). IIS just treats asp.net as a external plugin implemented in ISAPI and workswith it like black box (and only when it ' s n Eeds to give out the request toasp.net). In this mode, the asp.net is isn't much different from PHP or other technologies for IIS.
Classic mode is IIS6.0 and the only working mode for the following versions (only works under ISAPI Extension,isapi filters). In this mode asp.net is just a plug-in (Aspnet_isapi.dll,aspnet_filter.dll) that implements the Isapiextension and ISAPI filter respectively. The job of IIS is simply to send a specific request to asp.net, identical with plug-ins hosted in IIS, such as PHP.
Integrated Mode,on The other hand, are a new mode in IIS7 where IIS pipeline are tightlyintegrated (i.e. is just the same) a s ASP.net request pipeline. asp.net cansee every request it wants to and manipulate things along the way. asp.net isno longer treated as an external plugin. It ' s completely blended and Integratedin IIS. In this mode, asp.net httpmodules basically have nearly as much poweras an ISAPI filter would have had and ASP.net Httphan Dlers can have nearlyequivalent capability as an ISAPI extension could. In this mode, Asp.netis basically a part of IIS.
In integrated mode, however, the pipeline of IIS is tightly integrated with the ASP.net request pipeline, asp.net can be fully controlled to access the entire request pipeline. ASP.net is not part of an external plug-in, but is fully integrated in IIS. In this mode, the ASP.net httpmodules has the same control as the ISAPI filter, ASP.net httphandlers has the same control as the ISAPI extension, in other words, the asp.net is already part of IIS.
If you want to balance IIS6 and IIS7, you can keep the same definitions in httphandlers (for IIS6) and handlers (for IIS7) in web.config, but remember to add <validation Validateintegratedmodeconfiguration= "false"/>, or IIS7 error occurs because the definition repeats itself.