Last replied: 31-Jan-11 04:32 AM


Previously we use MS Windows-2003 with IIS 6.0 as Server.We have a HttpCompressionMOdule.cs class used for compression.To remove the unwanted resources from the particular file extension .
For ex:-we add the compression class as below
<add name="HttpCompressionModule" type="system.web.HttpCompressionModule" />
The above code working fine in windows 2003 server with iis 6.0

Now we are using windows 2008 server with Integerated Mode (not classic mode)
Using IIS 7.0
we add the module code in module section of IIS 7.0.
<add name="HttpCompression" type="HttpCompressionModule" />
The above code throw an exception as
"Event handlers can only be bound to HttpApplication events during IHttpModule initialization."

While using the same HttpCompressionModule class in IIS 7 its throw the above error.

Can any one tell me the solution for the above problem.

IIS 7's classic mode behaves in the same manner as IIS 6 and uses two pipelines to process requests, one for native-code application components and the other for managed code application components. The default pipeline mode for new IIS 7 hosting accounts is integrated. This option can be changed in your Hosting Control Center. So may be due to default mode of IIS 7 you are getting that error, Hope this would help you. Best of Luck :-)
Copyrights 2018,