title: StructureMap Dependency Resolution : Manually get instance from ActionFilter
body: <p>I'm trying to follow this tutorial using StructureMap : <a href="http://iridescence.no/post/Constructor-Injection-for-ASPNET-MVC-Action-Filters.aspx" rel="nofollow">http://iridescence.no/post/Constructor-Injection-for-ASPNET-MVC-Action-Filters.aspx</a></p>
  
  <p>What I'm trying to figure out is the StructureMap equivalent of this line:</p>
  
  <pre><code>var container = (ICanResolveDependencies) HttpContext.Current.ApplicationInstance;
  </code></pre>
  
  <p>I want to get the container back, so I can resolve dependencies there manually.</p>
  
  <p>This is how I am setting the dependencyresolver in global.asax</p>
  
  <pre><code>            GlobalConfiguration.Configuration.ServiceResolver.SetResolver(
              new StructureMapDependencyResolver(container));
  </code></pre>