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 8788397
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:08:06+00:00 2026-06-13T22:08:06+00:00

I am using Servicebus as a link between a web-application and BizTalk. In the

  • 0

I am using Servicebus as a link between a web-application and BizTalk.
In the web-application i earlier had the whole endpoint defined in the web.config but the endpoints has to be dynamic so i tried to set the endpoint by code.

After the change i only get an exception when i try to send a message to the queue. (ArgumentException – The argument entityName is null or empty)

Here is the code sending the message to the queue:

string queuename = Company.GetQueueName(O.companyId);
var factory = new ChannelFactory<IOrder>("requestQueueClientEndpoint", new EndpointAddress(ServiceBusEnvironment.CreateServiceUri("sb", queuename, string.Empty)));
var OrdRspChannel = factory.CreateChannel();

OrdRspChannel.Order(O);

And here is the configuration:

<system.serviceModel>
<behaviors>
  <endpointBehaviors>
    <behavior name="securityBehavior">
      <TransportClientEndpointBehavior>
        <tokenProvider>
          <sharedSecret issuerName="owner" issuerSecret="SECRET REMOVED" />
          <serviceCertificate>
            <authentication revocationMode="NoCheck"/>
          </serviceCertificate>
        </tokenProvider>
      </TransportClientEndpointBehavior>
    </behavior>
  </endpointBehaviors>
</behaviors>

<bindings>
  <netMessagingBinding>
    <binding name="netMessagingBinding" sendTimeout="00:10:00" receiveTimeout="00:10:00" openTimeout="00:10:00" closeTimeout="00:10:00" sessionIdleTimeout="00:10:00" prefetchCount="-1">
      <transportSettings batchFlushInterval="00:00:01" />
    </binding>
  </netMessagingBinding>
</bindings>

<client>
  <!-- Invoke BizTalk via Service Bus Queue -->
  <endpoint address="ADDRESS REMOVED" behaviorConfiguration="securityBehavior" binding="netMessagingBinding" bindingConfiguration="netMessagingBinding" contract="Procurement_MVC3.IOrder" name="requestQueueClientEndpoint" />
</client>
</system.serviceModel>

Here is the StackTrace:

{System.ArgumentException: The argument entityName is null or empty.
Parameter name: entityName

Server stack trace: 
   at Microsoft.ServiceBus.Messaging.MessagingFactory.CheckValidEntityName(String entityName, Int32 maxEntityNameLength, Boolean allowSeparator, String paramName)
   at Microsoft.ServiceBus.Messaging.MessagingFactory.<>c__DisplayClass1d.<BeginCreateMessageSender>b__1b(AsyncCallback c, Object s)
   at Microsoft.ServiceBus.Messaging.OpenOnceManager.OpenOnceManagerAsyncResult`1.BeginOpenCompleted(IAsyncResult result)
   at Microsoft.ServiceBus.Messaging.OpenOnceManager.OpenOnceManagerAsyncResult`1.BeginOpen()
   at Microsoft.ServiceBus.Messaging.OpenOnceManager.OpenOnceManagerAsyncResult`1..ctor(OpenOnceManager openOnceManager, TimeSpan openTimeout, AsyncCallback callback, Object state, Func`3 beginOperation, EndOperation`1 endOperation)
   at Microsoft.ServiceBus.Messaging.OpenOnceManager.Begin[T](AsyncCallback callback, Object state, Func`3 beginOperation, Func`2 endOperation)
   at Microsoft.ServiceBus.Messaging.MessagingFactory.BeginCreateMessageSender(String entityPath, TimeSpan timeout, AsyncCallback callback, Object state)
   at Microsoft.ServiceBus.Messaging.Channels.ServiceBusOutputChannel.OpenMessagingFactoryAndMessageSenderAsyncResult.CreateFactoryComplete(IAsyncResult result)
   at Microsoft.ServiceBus.Messaging.Channels.ServiceBusOutputChannel.OpenMessagingFactoryAndMessageSenderAsyncResult..ctor(ServiceBusOutputChannel outputChannel, TimeSpan timeout, AsyncCallback callback, Object state)
   at Microsoft.ServiceBus.Messaging.Channels.ServiceBusOutputChannel.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.CallOnceManager.CallOnce(TimeSpan timeout, CallOnceManager cascade)
   at System.ServiceModel.Channels.ServiceChannel.EnsureOpened(TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at Procurement_MVC3.IOrder.Order(Order Order)
   at Procurement_MVC3.Controllers.HomeController.ViewOrder(String id, Nullable`1 date, Nullable`1 confirmqty, String orderrowid, String supplierorderId, Boolean confirm) in c:\Projects2\trunk\Procurement_MVC3\Procurement_MVC3\Controllers\HomeController.cs:line 229}

I have searched both Google and StackOverflow for similar scenarios but found nothing.
I also have to update a production-environment with this code and this is the last piece of the puzzle so it’s starting to drag on.

  • 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-13T22:08:07+00:00Added an answer on June 13, 2026 at 10:08 pm

    The ServiceBusEnvironment.CreateServiceUri API takes three parameters, protocol, namespace and service path (which, for the binding you’re using, maps to the queue name). In the example you provide you’re passing the queue name as the namespace, and you’re missing the entity name, thus causing the missing entity name exception.

    Try switching your snippet to something like the following:

    var factory = new ChannelFactory<IOrder>("requestQueueClientEndpoint", new EndpointAddress(ServiceBusEnvironment.CreateServiceUri("sb", namespaceName, queuename)));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We are using Spring+JPA for our RESTful web services application. This is a high
I'm using WCF services in the client application for transfering data from client to
I am new to using web services. I am assigned a task in which
I m new to using Web services using JavaScript. All I want is to
Has anyone built Java web services using Maven-2. I've read about the jax-ws plugin,
Using Xcode4.2.1, with a basic PhoneGap template based app. (I say template, but I
I have a simple gallery style link setup using image swap on hover that
I want to create Spring web services using JiBX. I already have my Java
I am developing a web app on google app engine using java.I have links
I am developing an android application which gives stock information using YQL. In the

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.