title: Ninject dependencies that are InRequestScope are not disposed
body: <p>This question has been asked many times before, but for the life of me I can not get Ninject to dispose services that are InRequestScope. I have looked at all the answers and most of them tell the user to use <code>Ninject.MVC3</code> or <code>OnePerRequestHttpModule</code>. I am using <code>Ninject.MVC5</code>.</p>
  
  <p>Here is how to get to where I am:</p>
  
  <p>Using VS2013</p>
  
  <ul>
  <li>Add new project (ASP.NET Web application) </li>
  <li>Choose MVC and no authentication</li>
  <li>Add NuGet reference to Ninject.MVC5</li>
  <li><p>Add an interface to project:</p>
  
  <pre><code>public interface IBlah : IDisposable
  {
      void DoSomething();
  }
  </code></pre></li>
  <li><p>Add an implementation for the interface:</p>
  
  <pre><code>public class Blah : IBlah
  {
      private static int _count;
  
      public Blah()
      {
          _count++;
          Debug.WriteLine("Blah nr {0} created", _count);
      }
  
      public void DoSomething()
      {
          Debug.WriteLine("DoSomething called");
      }
  
      public void Dispose()
      {
          _count--;
          Debug.WriteLine("Blah disposed. Still left {0}", _count);
      }
  }
  </code></pre></li>
  <li><p>Open up home controller and add the following ivar and constructor:</p>
  
  <pre><code>private readonly IBlah _blah;
  
  public HomeController(IBlah blah)
  {
      _blah = blah;
  }
  </code></pre></li>
  <li><p>Add the following to <code>Index</code> action:</p>
  
  <pre><code>_blah.DoSomething();
  </code></pre></li>
  <li><p>Open NinjectWebCommon and add the following line to <code>RegisterServices</code> method</p>
  
  <pre><code>kernel.Bind&lt;IBlah&gt;().To&lt;Blah&gt;().InRequestScope();
  </code></pre></li>
  <li><p>Debug the project and look at Debug output you will see (among system messages)</p>
  
  <pre><code>"Blah nr 1 created"
  "DoSomething called"
  </code></pre></li>
  <li><p>Hit refresh in the browser and you will see</p>
  
  <pre><code>"Blah nr 2 created"
  "DoSomething called"
  </code></pre></li>
  <li><p>Nothing gets output for disposing, also breakpoint inside Dispose is never hit.</p></li>
  </ul>
  
  <p>My test solution can be downloaded here: <a href="http://www.upload.ee/files/4044477/NinjectTest.zip.html" rel="nofollow">http://www.upload.ee/files/4044477/NinjectTest.zip.html</a></p>
  
  <p><strong>What the hell am I doing wrong???</strong></p>
  
  <hr>
  
  <p><strong>UPDATE 15 May 2014</strong></p>
  
  <p>There is now a new version (3.2.2) of <code>Ninject.Web.Common</code> package available for NuGet that has fixed the bug.</p>