I have ASP.NET MVC 4 with an HttpModule. I am aware that module’s Init method may be called several times, once for each HttpApplication object, but I expect the actual BeginRequest event to fire only ONCE for each incoming web request. That’s not what’s happening.
I noticed that BeginRequest consistently fires twice for a simple POST I am sending to the server. I am sure I am sending only one request — there are no images.
Why would BeginRequest be called multiple times for a simple POST to the server?
Thanks.
Its fire on every request, it may be images, scripts, handlers, pages, what ever.
If you debug and step on it you can see what files calls it. You can also place this line inside to see what is calling it live.