Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8450241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:55:05+00:00 2026-06-10T10:55:05+00:00

I am using NServiceBus 2.6.0.1504 on windows server 2003 32 bit. The log file

  • 0

I am using NServiceBus 2.6.0.1504 on windows server 2003 32 bit.

The log file generated indicates that everything is getting wired up, but for some reason, “CreateBus()” returns null. Ignore my debugging code 🙂

        SetLoggingLibrary.Log4Net(log4net.Config.XmlConfigurator.Configure);

        var one = Configure.With(typeFinder.GetAssemblies());
        var two = one.DefaultBuilder();
        var three = two.MsmqSubscriptionStorage();
        var four = three.XmlSerializer();
        var five = four.MsmqTransport();
        var six = five.IsTransactional(false);
        var seven = six.PurgeOnStartup(true);
        var eight = seven.UnicastBus();
        var nine = eight.LoadMessageHandlers();
        var ten = nine.ImpersonateSender(false);
        var eleven = ten.CreateBus();
        if (eleven == null)
            throw new Exception("createbus");
        var twelve = eleven.Start();

The exception with the message “createbus” always gets thrown.

This works on my dev box with is Windows Server 2008 R2 64 bit.

Here is my config for the web app.

  <MsmqSubscriptionStorageConfig Queue="MedXChangeSubcriptions" />
  <MsmqTransportConfig InputQueue="MedXChangeForms" ErrorQueue="error" NumberOfWorkerThreads="1" MaxRetries="5" />
  <UnicastBusConfig>
    <MessageEndpointMappings>
      <add Messages="MethodFactory.MedXChange.Library" Endpoint="MedXChangeWeb" />
    </MessageEndpointMappings>
  </UnicastBusConfig>

Any ideas? Any help would be greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T10:55:07+00:00Added an answer on June 10, 2026 at 10:55 am

    NServiceBus will return null if a bus has already been created. So determine if someone is already instantiating a bus for you.

    In my scenario, we were inconsistently defining endpoint configurations. In one process, we would implement IConfigureThisEndpoint and then explicitly configure and instantiate a bus. In another process we would inherit from AsA_Publisher which implicitly creates a bus for you; and when it came time to explicitly define our bus’ configuration for this other process we would throw NullReferenceException on the fluent CreateBus method. Removing the AsA_Publisher inheritance resolved the issue.

    Hope this helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using NServiceBus 3 and when I receive a message I'm getting this error
I start the NServisBus.host.exe file from my wpf application using the following code: System.Diagnostics.Process.Start(NServiceBus.Host.exe);
I am creating a web application that is going to send messages using NServiceBus,
When I subscribe as the recipient of a certain type of message using NServiceBus
I am trying to use NServiceBus with an ASP.NET MVC 2 website (using VS
I am very new to nservicebus. I am using version 3.0.1, the last one
I'm trying to setup NServiceBus in Azure. During local development I am using the
Is it possible to disable retries in NServiceBus, version 3.2.2? Using the following configuration,
Using SQL Server 2008 R2 we are looking for a way to select the
Using NServiceBus with the NHibernate saga persister, how can I avoid duplicate sagas when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.