title: Why is HttpApplication constructor called several times
body: <p>Can somebody explain why the constructor of a custom class derived from <strong>HttpApplication</strong> is called several times upon application startup?</p>
  
  <p>My code structure is the following:<br/>
   - My <strong>Global</strong> class in global.asax derives from <strong>CustomApp</strong> class.<br/>
   - The <strong>CustomApp</strong> class derives from <strong>HttpApplication</strong> class</p>
  
  <p>The <strong>Global</strong> class is created at startup, but when I place a breakpoint in the constructor, it is invoked several times!  I thought there should be only one instance of <strong>Application</strong> class created?</p>
  
  <p>Am I wrong?</p>
  
  <p><strong>UPD</strong>: the web server can indeed create several <strong>HttpApplication</strong> instances to process multiple requests coming in at the same time. This becomes especially apparent when you place a breakpoint in the constructor of your <strong>HttpApplication</strong> descendant. Several requests will be pending from the client (http content, CSS files, etc) and to serve each of them the web server will create new instances of HttpApp. So, beware of this, when writing the application initialization logic.</p>