title: How do I get the current Castle Windsor container?
body: <p>I am a Castle Winsor Noob.  I have a WebForm project that is a hot mess.  I am trying to resolve a dependency to test user registration.  How do I get to the current WindsorContainer?</p>
  
  <pre><code>IWindsorContainer container = ???;
  IRegistrationLogic registrationLogic = container.Resolve&lt;IRegistrationLogic&gt;();
  _registrationLogic.Register();
  </code></pre>
  
  <p>Here is my Bootstrapper:</p>
  
  <pre><code>public class WindsorConfigTask : ICastleBootstrapperTask
  {
  
      public void Execute()
      {
          Container.AddFacility&lt;WcfFacility&gt;();
          Container.Register(
              Component.For&lt;IProcessMessageRequest&gt;()
                  .ActAs(
                      new DefaultClientModel
                      {
                          Endpoint =
                              WcfEndpoint.ForContract&lt;IProcessMessageRequest&gt;().FromConfiguration("surveyClient2")
                      }
                  ),
              Component.For&lt;ILocalMembershipService&gt;()
                  .ActAs(
                      new DefaultClientModel
                      {
                          Endpoint =
                              WcfEndpoint.ForContract&lt;ILocalMembershipService&gt;().FromConfiguration(
                                  "localMembershipClient")
                      })
  
  
              );
  
          Container.Register(Component.For&lt;IRegistrationLogic&gt;()
              .ImplementedBy&lt;RegistrationLogic&gt;()
              .LifeStyle.Is(LifeStyleType));
      }
  
      public IWindsorContainer Container { get; set; }
  
  
      #region ICastleBootstrapperTask Members
  
  
      public Castle.Core.LifestyleType LifeStyleType
      {
          get;
          set;
      }
  
      #endregion
  }
  </code></pre>