2

I am developing my first Azure implementation, I have set up my azure account and i used NuGet to install The proper DLL's and configs to my application. when i set my WCF client to point to the Service Bus Queue and run the method i get this exception:

Microsoft.ServiceBus.ServerErrorException

   at Microsoft.ServiceBus.RelayedSocketInitiator.Connect(Uri uri, TimeSpan timeout)
   at Microsoft.ServiceBus.ConnectivityModeConnectionInitiator.Connect(Uri uri, TimeSpan timeout)
   at Microsoft.ServiceBus.Channels.BufferedConnectionInitiator.Connect(Uri uri, TimeSpan timeout)
   at Microsoft.ServiceBus.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
   at Microsoft.ServiceBus.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at Microsoft.ServiceBus.Channels.LayeredChannel`1.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)

my endpoint config is:

<endpoint address="sb://MyService.servicebus.windows.net/MyServicequeue"
                binding="netTcpRelayBinding" contract="PaperlessImportServiceWCF.PaperlessImportServiceSoap"
                name="MyServiceServiceSoap"  behaviorConfiguration="sbTokenProvider"/>

My endpoint Behavior is:

The Error message is very generic and I am not sure what the is first place I should look

1 Answer 1

2

I think you have a few misunderstandings about how the relay service works. From the configuration you show, you're using the NetTcpRelayBinding, which is meant for request-replay connectivity. However, in your endpoint, it seems like you're using a queue address as an endpoint.

a) If you meant to use your service/client in a request-reply fashion, then you need to create a service bus relay endpoint, and use that address in your endpoint. This tutorial is a good starting point for this servicebus feature.

b) If you meant to use the queue, then you need to the NetMessagingBinding. This post is a good starting point on how to perform said scenario.

In either case, it also seems like you're using the wrong base address. Is 'myservice' the name of your servicebus namespace? If it's not, then you should replace it with the name of your namespace. The format of a base servicebus address is: protocol://YOUR_NAMESPACE.servicebus.windows.net

1
  • myservice is not i replaced my real name space with MyNamespace. and yes i want to do b). Thanks I will take a look and see what i can do.
    – greektreat
    Feb 9, 2013 at 3:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.