Relay binding not working for Window Server Service Bus 1.1

ⅰ亾dé卋堺 提交于 2019-12-12 01:05:37

问题


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.


回答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.



来源:https://stackoverflow.com/questions/21157201/relay-binding-not-working-for-window-server-service-bus-1-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!