Why does the above error occur?
There are two modes of application pool in IIS7, one is "Integrated mode" and one is "Classic mode".
Classic mode is the way we used to be in IIS 6.
If you are using Integrated mode, you will need to change the configuration files for your custom httpmodules and httphandlers to transfer them to <modules> and
There are two ways of solving this:
The first method, configure the application pool
Configure the application pool on IIS7 and change the schema of the program pool to "classic", after which everything is fine.
The second type: Modify the configuration file Webconfig
Before modification:
<Configuration> <system.web> <httphandlers> <AddPath= "*.aspx"verb="*"type= "Customerhander, ClassLibrary1" /> </httphandlers> <compilationDebug= "true"targetframework= "4.5" /> <HttpRuntimetargetframework= "4.5" /> </system.web></Configuration>
After modification:
<Configuration> <system.web> <compilationDebug= "true"targetframework= "4.5" /> <HttpRuntimetargetframework= "4.5" /> </system.web> <system.webserver> <handlers> <Addname= "Customerhander"Path= "*.aspx"verb="*"type= "Customerhander, ClassLibrary1"Precondition= "Integratedmode" /> </handlers> <Validationvalidateintegratedmodeconfiguration= "false" /> </system.webserver></Configuration>
The project structure is as follows:
1. Custom hander is a reference to other class libraries, so the type attribute is separated by commas, preceded by: Fully qualified class name followed by: DLL file (not including suffix name)
2. If hander is in this project,
The configuration in the Web. config file is as follows:
The type attribute is only required to fill in the class name.
Add: If you want to keep the original settings, you can set the Disable Authentication integration mode (validateintegratemodeconfiguration= "false"), which will not cause an error.
Webconfig Registration HttpHandler Error: An ASP. NET setting is detected that is not applicable in integrated managed pipeline mode.