HttpModule stopped functioning for no reason. Why? RRS feed

  • Question

  • User819964165 posted
    I've created an HTTP module that pretty much just tracks hits and visits. So when a page is requested it increments the number of hits. Pretty straightforward! The module executes code on Application_Start and Session_Start. I also created a page where I can view reports on hits. I havent checked this page in a few weeks and I decided to take a look at it today. I realized that it hasn't been traking hits for the past two weeks, which means none of the httpmodule code was executing. I made a modification to my web.config file so that the application can restart itself and the module is working again. What could've caused it to stop working in the first place? Everything else was running fine.
    Thursday, July 15, 2004 1:22 PM

All replies

  • User-1391363652 posted
    You indicated you were tracking page hits. Why not wire the BeginRequest event in your module? Application_Start is called only once during the lifetime of an application, i.e. when the web app starts/restarts. Session_Start isn't "granular" enough either. It seems you need to get to every request, though.
    Monday, July 19, 2004 11:36 AM
  • User819964165 posted
    I am tracking BeginRequest. That was a typo on my part. My bad. I meant to say that it's called on BeginRequest and SessionStart.
    Monday, July 19, 2004 11:43 AM