什麼是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();
您是否知道Windows Service Bus支持哪些WCF綁定? –
我們在Windows Server版本上提供了服務總線隊列和主題,因此這些支持使用netMessagingBinding。可以在這裏找到一個示例:http://code.msdn.microsoft.com/windowsazure/Brokered-Messaging-WCF-0a526451 –
此示例不適用於開箱即用的Windows Service Bus。 –