문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top