title: StructureMap Exception Code: 202 No Default Instance defined for PluginFamily NServiceBus.IBus, NServiceBus, Version=2.6.0.1504
body: <p>Ex me,,,
  I have a problem in my code,<br>
  I want to create POS in my program,,<br>
  but i have message error</p>
  
  <blockquote>
    <p>StructureMap Exception Code: 202 No Default Instance defined for PluginFamily NServiceBus.IBus, NServiceBus, Version=2.6.0.1504, Culture=neutral, PublicKeyToken=9fc386479f8a226</p>
  </blockquote>
  
  <p>Here my script,,
  can anyone help me,,,</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  using Nancy;
  using Nancy.Security;
  using dokuku.pos.setting;
  using StructureMap;
  using NServiceBus;
  using dokuku.sales.pos.messages;
  using System.IO;
  using Nancy.IO;
  
  namespace dokuku.pos.web.modules
  {
      public class PosSettingModule : Nancy.NancyModule
      {
          public PosSettingModule()
          {
              this.RequiresAuthentication();
              Post["card/addcard.json"] = p =&gt;
              {
                  string addCard = getJson(this.Request.Body);
                  try
                  {
                      POSCard cards = this.CardService().Insert(addCard, this.CurrentAccount().OwnerId);
                      PublishCardCreated(cards);
                      return Response.AsJson(cards);
                  }
                  catch (Exception ex)
                  {
                      return Response.AsJson(new { error = true, message = ex.Message });
                  }
              };
  
  private void PublishCardCreated(POSCard cards)
  {
      ObjectFactory.GetInstance&lt;IBus&gt;().Publish(new CardCreated()
      {
          _id = cards._id,
          OwnerId = cards.OwnerId,
          Code = cards.Code,
          Name = cards.Name,
          Cost = cards.Cost,
          Discount = cards.Discount
      });
  }
  </code></pre>
  
  <p>if i running this program and click create button,,
  the system sent message error</p>
  
  <blockquote>
    <p>StructureMap Exception Code: 202 No Default Instance defined for PluginFamily NServiceBus.IBus, NServiceBus, Version=2.6.0.1504, Culture=neutral, PublicKeyToken=9fc386479f8a226c</p>
  </blockquote>