title: Application_EndRequest(object sender, EventArgs e) being called multiple times in asp.net
body: <p>In my application i'm defining a class which implements ihttpmodule and it contains following methods</p>
  
  <pre><code>  public void Init(HttpApplication application)
      {
          application.EndRequest += new EventHandler(Application_EndRequest);
      }
  
  
   private void Application_EndRequest(object sender, EventArgs e)
      {
          HttpApplication application = (HttpApplication)sender;
          HttpContext context = application.Context;
  
  
          IObjectContainer objectClient = context.Items[KEY_DB4O_CLIENT] as IObjectContainer;
  
          if (objectClient != null)
          {
              objectClient.Close();
          }
  
          objectClient = null;
          context.Items[KEY_DB4O_CLIENT] = null;
      }
  </code></pre>
  
  <p>when i try to run the application and debug it, i notice one strange thing:</p>
  
  <p>in chrome private void Application_EndRequest(object sender, EventArgs e) is getting executed 3 times when the application starts and again 3 times when the application ends.</p>
  
  <p>in Internet explorer private void Application_EndRequest(object sender, EventArgs e) is getting executed 2 times when the application starts and again 2 times when the application ends.</p>
  
  <p>Why is Application_EndRequest getting executed multiple times. Is it not supposed to run only once ?</p>
  
  <p>And also i would like to know the difference between Visual Studio Development Web Server and IIS ?</p>
  
  <p>What is the difference between both of me.</p>
  
  <p>Please help me</p>
  
  <p>Thanks in anticipation</p>