httpModules not working on iis7

后端 未结 3 1237
失恋的感觉
失恋的感觉 2020-12-16 13:15

I have the following module

public class LowerCaseRequest : IHttpModule {
     public void Init(HttpApplication context) {
         context.BeginRequest += n         


        
相关标签:
3条回答
  • 2020-12-16 13:40

    Above is correct for IIS 7.5

    <modules>
      <add name="CustomModule" type="Samples.CustomModule" />
    </modules>
    

    the only problem I got, is that instance of application pool for particular application should be set to managed Pipeline = Integrated, not Classic..
    or: Using Classic Mode

    If your application is to use Classic mode, then make sure that your application is configured for that type of pool and your modules are configured in system.web section and not in system.webServer section of web.config file.

    0 讨论(0)
  • 2020-12-16 13:55

    On IIS7 and higher use

    <configuration>
      <system.webServer>
        <modules>
          <add name="CustomModule" type="Samples.CustomModule" />
        </modules>
      </system.webServer>
    </configuration>
    
    0 讨论(0)
  • 2020-12-16 14:00

    In IIS go to feature view select module

    double click to module then right click and press (Add Managed Module)

    then put name and type as defined in web.config

    example:

    <httpModules>
      <add name="CustomModule" type="WebApplication.Security.CustomModule" />
    </httpModules>
    
    0 讨论(0)
提交回复
热议问题