【问题标题】:Port Configuration端口配置
【发布时间】:2013-06-29 01:47:11
【问题描述】:

什么是 Windows(不是 Azure)服务总线的正确端口配置,以便标准的 azure 绑定可以在 AppFabric 服务总线上工作?

在下面的示例中,我在尝试打开主机时收到“无法通过 TCP (9351, 9352) 或 HTTP (80, 443) 访问 vm-sbdemo-petar”。

服务总线配置(默认):

HTTPS Port                  9355
TCP Port                    9354
Message Broker Port         9356
Resource Provider HTTPS Port    9359
Amqp Port                   5672
Amqps Port                  5671
Internal Communication Port Range   9000 - 9004

主持人:

app.config

<system.serviceModel>
      <services>
         <service name = "MyService">
            <endpoint
               address  = "sb://vm-sbdemo-petar/ServiceBusDefaultNamespace/MyService/"
               binding  = "netOnewayRelayBinding"
               contract = "IMyContract"
            />
         </service>
      </services>
   </system.serviceModel>

主要

ServiceHost host = new ServiceHost(typeof(MyService));
      host.SetServiceBusCredentials("string");

      ConnectionStatusBehavior behavior = new ConnectionStatusBehavior();
      behavior.Connecting += OnConnecting;
      behavior.Offline += OnOffline;
      behavior.Online += OnOnline;

      foreach(ServiceEndpoint endpoint in host.Description.Endpoints)
      {
         endpoint.Behaviors.Add(behavior);
      }
      host.Open();

      Console.WriteLine("Press ENTER to shut down service.");
      Console.ReadLine();

      host.Close();

【问题讨论】:

    标签: wcf servicebus


    【解决方案1】:

    Windows Server 的服务总线不支持中继功能,目前仅在 Azure 服务总线上可用。更多详情请访问:http://msdn.microsoft.com/en-us/library/jj193022(v=azure.10).aspx

    【讨论】:

    • 您知道 Windows 服务总线支持哪些 WCF 绑定吗?
    • 我们在 Windows Server 版本上提供了服务总线队列和主题,因此这些支持使用 netMessagingBinding。此处提供示例:code.msdn.microsoft.com/windowsazure/…
    • 此示例不适用于开箱即用的 Windows 服务总线。
    【解决方案2】:

    如果涉及代理,请尝试。

    <system.net>
    <defaultProxy useDefaultCredentials="true">
    </defaultProxy>
    </system.net>
    

    【讨论】:

    • 感谢 Vibhu,但这一切都在单个 VM 中运行。
    猜你喜欢
    • 2014-02-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-11-24
    • 2011-02-25
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多