1

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

主持人:

应用程序配置

<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();
4

2 回答 2

2

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

于 2013-07-01T17:28:41.903 回答
2

如果涉及代理,请尝试。

<system.net>
<defaultProxy useDefaultCredentials="true">
</defaultProxy>
</system.net>
于 2013-06-29T08:13:03.807 回答