title: Can't inject dependency in service
body: <p>I have a service that looks like this: </p>
  
  <pre><code>public class StuffService : ServiceStack.Service
  {
      private IStuffHandler _handler;
  
      public StuffService(IStuffHandler handler)
      {
          _handler = handler;
      }
  
      public void Post(RequestMessage message)
      {
          _handler.HandleIt();
      }
  }
  </code></pre>
  
  <p>In the StuffService, _handler should be instantiated as the following class: </p>
  
  <pre><code>public class StuffHandler : IStuffHandler
  {
      public void HandleIt()
      {
          //do stuff
      }
  }
  </code></pre>
  
  <p>And in a seperate file: </p>
  
  <pre><code>  public class ServiceAppHost : AppHostHttpListenerBase
      {
          public ServiceAppHost() :
          base("CoolConnectionString", typeof(ServiceAppHost).Assembly)
          {
          }
  
          public override void Configure(Container container)
          {
              this.Plugins.Add(new SwaggerFeature());
              container.RegisterAs&lt;IStuffHandler, StuffHandler&gt;();
          }
      }
  
      static void Main(string[] args)
      {
          ServiceAppHost appHost = new ServiceAppHost();
          appHost.Init();
          appHost.Start("http://localhost:7894/");
          Console.Read();
      }
  </code></pre>
  
  <p>Now, I can't figure out how to set IStuffHandler to an instance of StuffHandler. I have followed <a href="https://github.com/ServiceStack/ServiceStack/wiki/The-IoC-container" rel="nofollow">this page</a> on the official ServiceStack documentation pages. I have tried several different methods on that linked page, but I can't get ServiceStack to instantiate _handler as a StuffHandler instance. What do I need to do?</p>