title: NServicebus DataBus
body: <p>I need to move some large files, and I wanted to use NserviceBus as the files are not persisted on the system. I have been trying to get this up and running using the new databus feature in v.3. 
  The files are generated in one process, then passed onto the bus. My problem is that I can't get the bus started. I have a sample application below that basically mirrors my set up, except that in the 'real' application, the bus lives in a different application (not pushed to a server yet so I just run a dev instance)</p>
  
  <pre><code>    #region Declarations
  
      private IBus Bus { get; set; }
  
      #endregion
  
      #region Constructors
  
      public Sender()
      {       
          if (Directory.Exists(BasePath))
          {
              Bus = Configure.Instance
                  .FileShareDataBus(BasePath)
                  .UnicastBus().DoNotAutoSubscribe()
                  .CreateBus()
                  .Start();
          }
      }
  
      #endregion
  
      #region Methods
  
      public void SendMessage()
      {
          // get a list of file names
          List&lt;string&gt; fileList = Directory.GetFiles(@"c:\test\").ToList();
  
  
          Bus.Send&lt;GenericListMessage&gt;(message =&gt;
                                          {
                                              message.Name = "TEST";
                                              message.FileList = new DataBusProperty&lt;List&lt;string&gt;&gt;(fileList);
                                          });
      }
      #endregion
  </code></pre>
  
  <p>My EndpointConfig.cs looks like this:</p>
  
  <pre><code>public class EndpointConfig : IConfigureThisEndpoint, AsA_Client 
  {
  }
  
  internal class SetupDataBus : IWantCustomInitialization
  {
      public static string BasePath = @"c:\storage\";
  
      public void Init()
      {
          Configure.Instance
              .FileShareDataBus(BasePath)
              .UnicastBus()
              .DoNotAutoSubscribe();
      }
  }
  </code></pre>
  
  <p>I have changed my code in the Sender class to send a non-Databus message, and a simple message, and this worked fine. But when I try to use it to send a Databus message I keep getting a NullReferenceException for the bus. If anyone can give me a pointer I would really appreciate it.</p>