asp.net httpModule

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • StevieMars
    New Member
    • Mar 2010
    • 21

    asp.net httpModule

    I have a HTTPModule which i want to be called every time the page loads but it seems that it will load the first time I browse to the site and then not load again even when I refresh or click a link to another page. If I edit and save the web.Config then the httpModule will hapilly load, but again only once.

    Strangly it was working perfectly fine a while ago. I've changed something but I'm not sure what.

    Any ideas??
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    I don't know much about HTTPModules so I did some research to try and help you. HTTPModules are called as the request is being made to the server and as the response is being sent back to to the browser. They are called every request. They are registered with the Application object. So this would mean that they have the lifespan of the Application.

    You probably moved some code into the constructor or the Init method or something that should be in the method that works with the request.

    Useful Links:
    15 Seconds article on Http Handlers and HTTP Modules in ASP.NET
    Walkthrough: Creating and Registering a Custom HTTP Module

    -Frinny

    Comment

    Working...