Windows(非Azure)Service Bus的正确端口配置是什么,以便标准的azure绑定可以在AppFabric Service Bus上运行?
在下面的示例中,我在尝试打开主机时收到“无法通过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();
答案 0 :(得分:2)
如果涉及代理,请尝试。
<system.net>
<defaultProxy useDefaultCredentials="true">
</defaultProxy>
</system.net>
答案 1 :(得分:2)
Windows Server Service Bus不支持中继功能,目前仅在Azure Service Bus上提供。更多详情请见:http://msdn.microsoft.com/en-us/library/jj193022(v=azure.10).aspx