ASP.NET - IHttpModule.BeginRequest firing 2X, Application_BeginRequest firing 1X
<p>I'm running VS 2008 and .NET 3.5 SP1.</p>

<p>I want to implement hit tracking in an HttpModule in my ASP.NET app. Pretty simple, I thought. However, the BeginRequest event of my HttpModule is firing twice for each page hit. The site is very simple right now...no security, just a bit of database work. Should log one row per page hit. Why is this event firing twice?</p>

<p>Moreover, IHttpModule.BeginRequest actually fires a different number of times for the first page hit when running for the first time (from a closed web browser)...3 times when I'm hitting the DB to provide dynamic data for the page, and only 1 time for pages where the DB isn't hit. It fires 2 times for every page hit after the first one, regardless of whether or not I'm touching the DB.</p>

<p>It's interesting to note that Application_BeginRequest (in Global.asax) is always firing only once.</p>

<p>Any ideas?</p>

<p>Thanks,
Jay</p>
