【问题标题】:Relay binding not working for Window Server Service Bus 1.1中继绑定不适用于 Window Server Service Bus 1.1
【发布时间】:2014-01-16 08:54:51
【问题描述】:

我已经为具有默认命名空间的 Windows Server 1.1(不是 Azure 服务总线)安装了服务总线。 我已经从 http://code.msdn.microsoft.com/windowsazure/Relayed-Messaging-Bindings-ca039161 并更改以下代码以生成令牌。

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");

但它抛出以下错误 "无法通过 TCP (9351, 9352) 或 HTTP (80, 443) 访问 servicebusdefaultnamespace.servicebus.windows.net

我也尝试过使用 BasicHTTPRelayBinding 的相同示例,但这不起作用。

我是否需要为中继绑定做一些其他配置 请推荐!!!

提前致谢。

【问题讨论】:

    标签: wcf servicebus azureservicebus azure-servicebusrelay


    【解决方案1】:

    目前,Service Bus 中继功能在 Service Bus 1.1 for Windows Server 上不可用。它仅在 Azure 服务总线中可用。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-04-18
    • 2015-03-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多