title: Error: No default instance is registered for ... when I can use GetInstance() directly to retrieve the object
body: <p>I have WebAPI project in which I have created a ControllerActivator which uses an custom dependency scope that essentially calls the StructureMap <code>container.GetNestedContainer()</code> in order to create a nested container per request.</p>
  
  <p>I then have a custom controller activator which uses this nested container (via the custom dependency scope) to activate my controllers.  All of the dependencies are injected by StructureMap into the controllers, and all of the dependencies of the dependencies are inject, and so on.</p>
  
  <p>I have an authenticator (action filter) which runs prior to the controller activator and uses the <code>IContainer.Inject()</code> method to inject an identity into the nested container for each individual request.  If I set a break point in the controller activator where I ask the container for the specific controller that I'm going to activate, I can do:</p>
  
  <pre><code>_container.GetInstance(typeof(IMyIdentity))
  </code></pre>
  
  <p>And the dependency scope's container (this would be the nested container) returns me the instance that I expect it to.  However, when I press F10 to let it attempt to resolve the controller I get the error:</p>
  
  <blockquote>
    <p>No default Instance is registered and cannot be automatically determined for type 'IMyIdentity'</p>
  </blockquote>
  
  <p>This comes with a list of about 6 chained dependencies that it was trying to create to fulfill the requirements of the controller it was trying to create.  For the life of me I can't figure out why I can ask the container directly for the instance and it will give it to me, but when it's asked indirectly it can't find it.  Also a <code>_container.WhatDoIHave()</code> shows the <code>MyIdentity</code> class being registered to the <code>IMyIdentity</code> interface with a name of "(Default)" and a lifecycle of "Object" (althought I'm not sure what "Object" lifecycle means).</p>