title: Ninject WithConstructorArgument : No matching bindings are available, and the type is not self-bindable
body: <p>My understanding of WithConstructorArgument is probably erroneous, because the following is not working:</p>
  
  <p>I have a service, lets call it MyService, whose constructor is taking multiple objects, and a string parameter called testEmail. For this string parameter, I added the following Ninject binding:</p>
  
  <pre><code>string testEmail = "test@example.com";
  kernel.Bind&lt;IMyService&gt;().To&lt;MyService&gt;().WithConstructorArgument("testEmail", testEmail);
  </code></pre>
  
  <p>However, when executing the following line of code, I get an exception:</p>
  
  <pre><code>var myService = kernel.Get&lt;MyService&gt;();
  </code></pre>
  
  <p>Here is the exception I get:</p>
  
  <blockquote>
    <p>Error activating string No matching bindings are available, and the
    type is not self-bindable. Activation path:<br>
    2) Injection of
    dependency string into parameter testEmail of constructor of type
    MyService<br>
    1) Request for MyService</p>
    
    <p>Suggestions:<br>
    1) Ensure that you have defined a binding for string.<br>
    2) If the binding was defined in a module, ensure that the module has
    been loaded into the kernel.<br>
    3) Ensure you have not accidentally
    created more than one kernel.<br>
    4) If you are using constructor
    arguments, ensure that the parameter name matches the constructors
    parameter name.<br>
    5) If you are using automatic module loading, ensure
    the search path and filters are correct.</p>
  </blockquote>
  
  <p>What am I doing wrong here?</p>
  
  <p><strong>UPDATE</strong>:</p>
  
  <p>Here is the MyService constructor:</p>
  
  <pre><code>[Ninject.Inject]
  public MyService(IMyRepository myRepository, IMyEventService myEventService, 
                   IUnitOfWork unitOfWork, ILoggingService log,
           IEmailService emailService, IConfigurationManager config,
           HttpContextBase httpContext, string testEmail)
  {
      this.myRepository = myRepository;
      this.myEventService = myEventService;
      this.unitOfWork = unitOfWork;
      this.log = log;
      this.emailService = emailService;
      this.config = config;
      this.httpContext = httpContext;
      this.testEmail = testEmail;
  }
  </code></pre>
  
  <p>I have standard bindings for all the constructor parameter types. Only 'string' has no binding, and HttpContextBase has a binding that is a bit different:</p>
  
  <pre><code>kernel.Bind&lt;HttpContextBase&gt;().ToMethod(context =&gt; new HttpContextWrapper(new HttpContext(new MyHttpRequest("", "", "", null, new StringWriter()))));
  </code></pre>
  
  <p>and MyHttpRequest is defined as follows:</p>
  
  <pre><code>public class MyHttpRequest : SimpleWorkerRequest
  {
      public string UserHostAddress;
      public string RawUrl;
  
      public MyHttpRequest(string appVirtualDir, string appPhysicalDir, string page, string query, TextWriter output)
      : base(appVirtualDir, appPhysicalDir, page, query, output)
      {
          this.UserHostAddress = "127.0.0.1";
          this.RawUrl = null;
      }
  }
  </code></pre>