【发布时间】:2018-02-09 17:49:17
【问题描述】:
我已将我的 servicefabric 有状态服务设置为使用两个侦听器端点
- ServiceRemoting V2
- WCF 远程处理
我的CreateServiceReplicaListerners() 看起来像这样 -
return new[]
{
new ServiceReplicaListener((c) => new FabricTransportServiceRemotingListener(c, this),
"dataServiceRemotingListener"),
new ServiceReplicaListener((context) =>
new WcfCommunicationListener<IReferenceDataService>(
wcfServiceObject:this,
serviceContext:context,
//
// The name of the endpoint configured in the ServiceManifest under the Endpoints section
// that identifies the endpoint that the WCF ServiceHost should listen on.
//
endpointResourceName: "WcfDataServiceEndpoint",
//
// Populate the binding information that you want the service to use.
//
listenerBinding: WcfUtility.CreateTcpListenerBinding()
), "dataServiceWCFListener")
};
但是,在测试中我发现只有一个端点有效。具体来说,只有第一个注册的作品。在上述情况下,服务远程处理工作但 WCF 侦听器没有。在我试图进行 wcf 调用的客户中,我不断收到错误 - The provided URI scheme 'localhost' is invalid; expected 'net.tcp'.
当更改它们的注册顺序时,WCF 远程处理工作但 SeviceRemoting 不工作。这看起来像一个错误,不知道是否有人遇到过类似的问题?
请指教。
更新:
这是我的客户端详细信息
_service = serviceProxyFactory.CreateServiceProxy<IReferenceDataService>(
new Uri("fabric:/DataService/ReferenceDataService"),
new ServicePartitionKey(0));
【问题讨论】:
-
您的客户端代码是什么样的,您使用什么 URI 进行连接?
-
@HiredMind 用客户电话详细信息更新了我的问题
标签: azure-service-fabric service-fabric-stateful