IHttpModule Gotchas – The Init() Method Can Get Called Multiple Times (Images)

10 March 2010 - 11:35 PM / by Dominic Pettifer. 1 Image 3 Comments

Development Gotchas - When creating and registering IHttpModules, some people mistakenly think that only a single instance of the IHttpModule is created, and that the Init() method is only called once. I’ll explain how and why this is incorrect, and how this misunderstanding can lead to subtle bugs in your ASP.NET web application.

Images

  • HttpApplication context pooling with multiple requests

    HttpApplication context pooling with multiple requests

Random Image

Insanely Cute Hamster

Insanely Cute Hamster (from the blog And So It Begins (part 2) )

Quick Poll

What is your DIP/IOC Container of choice?

  • 24.7% - Castle Windsor
  • 15.3% - Unity
  • 14.7% - StructureMap
  • 10.7% - Ninject
  • 10.0% - Spring.NET
  • 6.0% - Huh!?
  • 5.3% - None - DIP is the work of Satan!
  • 4.7% - Autofac
  • 4.7% - None - But I want to look into DIP
  • 2.0% - DIY (my own container)
  • 0.7% - PicoContainer.NET
  • 0.7% - LinFu
  • 0.7% - Other
  • 0% - Puzzle.NFactory
  • 0% - S2Container.NET

Thank you for voting!

View Comments (1) (See previous polls)

Latest Tweets

  • @gafroninja Does your hair stand up for 10 mins each day, then you have a Scrum haircut

    1:37 PM September 3rd from Echofon
  • @scottgal Teeth are nature's nail clippers :-)

    10:42 AM September 3rd from Echofon
  • @brucel Those are amazing! Does the 6th one down (psychedelic colours) mean we can create gradient effects in CSS3? #css3

    4:28 PM September 2nd from Echofon
  • Sorry for the rant, but if you tweet YouTube videos hidden behind URL shortening services, please warn beforehand

    2:01 PM September 2nd from Echofon
  • WHOEVER THOUGHT AUTO PLAYING VIDEOS WERE A GOOD IDEA SHOULD BE SHOT!!!!!!!1!!!!11!1!!

    1:57 PM September 2nd from Echofon

View Dominic Pettifer's Twitter page.