0

I have installed Service Bus for Windows Server 1.1 (Not Azure Service Bus) that is having a default namespace. I have downloded the sample from http://code.msdn.microsoft.com/windowsazure/Relayed-Messaging-Bindings-ca039161 and change the following code to generate the token.

var machineName = Dns.GetHostEntry(string.Empty).HostName;
        var networkCredential = new NetworkCredential(WindowsUsername, WindowsPassword, WindowsDomain);


        string serviceNamespace = "ServiceBusDefaultNamespace";


        // The TransportClientEndpointBehavior specifies the Service Bus credentials for a particular endpoint
        var stsUris = new List<Uri> { new Uri(string.Format(CultureInfo.InvariantCulture, "https://{0}:9355/", machineName)) };
        TransportClientEndpointBehavior relayCredentials = new TransportClientEndpointBehavior
        {
            TokenProvider = TokenProvider.CreateOAuthTokenProvider(stsUris, networkCredential)
        };

        //TransportClientEndpointBehavior relayCredentials = new TransportClientEndpointBehavior();
        //relayCredentials.TokenProvider = TokenProvider.CreateSharedSecretTokenProvider(issuerName, issuerSecret);    

        Uri address = ServiceBusEnvironment.CreateServiceUri("sb", serviceNamespace, "HelloService");

But it is throwing the following error "Unable to reach servicebusdefaultnamespace.servicebus.windows.net via TCP (9351, 9352) or HTTP (80, 443)"

I have also tried the same sample with BasicHTTPRelayBinding,But that doesn't work.

Do i need to do some other configuration for relay binding Please suggest !!!

Thanks in advance.

TheDude
  • 3,796
  • 2
  • 28
  • 51
R J
  • 73
  • 1
  • 6

1 Answers1

1

Currently the Service Bus Relay features are NOT available on Service Bus 1.1 for Windows Server. It is only available in Azure Service Bus.

Abhishek Lal
  • 3,233
  • 1
  • 17
  • 16
  • Could you please provide any microsoft link for the above statement. – R J Jan 17 '14 at 05:44
  • @RJ the official docs do not include Relay support: http://msdn.microsoft.com/en-us/library/windowsazure/jj193027.aspx – TheDude Jan 21 '14 at 01:55
  • This question also covers it: http://stackoverflow.com/questions/11644262/does-service-bus-for-windows-server-service-bus-1-0-beta-support-relay-functio – TheDude Jan 21 '14 at 01:56