1

I programmed a custom HTTPModule through implemnting IHttpModule interface.Then i registered it in web.config file

<configuration>
  <system.web>
    <httpModules >
      <add name="AuthHttpModule" type="AuthHttpModule" />
    </httpModules>
  </system.web>
</configuration>

but it's throw an error when i try to access any page

An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.

Note: I'm using VS2012 and C#.

Dot Freelancer
  • 4,083
  • 3
  • 28
  • 50

1 Answers1

7

If you are using Integrated mode configure you handlers & modules inside system.webServer instead of system.web.

<configuration>
    <system.webServer>
      <handlers>

      </handlers>
      <modules>

      </modules>
    </system.webServer>
</configuration>

Or

If you want to use you existing setting you can use "Classic Mode" for that.

doppelgreener
  • 4,809
  • 10
  • 46
  • 63
Kapil Khandelwal
  • 15,958
  • 2
  • 45
  • 52
  • I didn't know what is the integrated or classic mode mean, but i tested your code and it's work now! can you give me an explanation ? – Dot Freelancer Sep 21 '12 at 13:51
  • http://stackoverflow.com/questions/716049/what-is-the-difference-between-classic-and-integrated-pipeline-mode-in-iis7 – David Chiew Oct 13 '15 at 00:35