[英]WCF RoutingService not routing wsDualHttpBinding with callbacks
I´m having problems using the.Net 4.0 Routing Service connecting to a service using callbacks.我在使用 .Net 4.0 路由服务连接到使用回调的服务时遇到问题。 To my understanding both binding and callbacks are supported by the Routing Service.
据我了解,路由服务支持绑定和回调。 Service and Client alone are operating fine.
仅服务和客户端运行良好。
What I did, was taking the MS WCF and WF Samples located here: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=35ec8682-d5fd-4bc3-a51a-d8ad115a8792&displaylang=en我所做的是获取位于此处的 MS WCF 和 WF 样本: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=35ec8682-d5fd-4bc3-a521a-d8
and changed the configuration to match the binding of my service.并更改了配置以匹配我的服务的绑定。 I can call operations via the routing service from the client to the service, only callbacks from service to the client are not received by the client.
我可以通过从客户端到服务的路由服务调用操作,只有从服务到客户端的回调不会被客户端接收到。
The routing service is configured as follows, using a console application as a host路由服务配置如下,使用控制台应用程序作为主机
using (ServiceHost serviceHost =
new ServiceHost(typeof(RoutingService)))
{
serviceHost.Open();
Console.ReadLine();
}
<system.serviceModel>
<diagnostics>
<messageLogging logMalformedMessages="true" logMessagesAtServiceLevel="true"
logMessagesAtTransportLevel="true" />
</diagnostics>
<services>
<!--ROUTING SERVICE -->
<service behaviorConfiguration="routingData" name="System.ServiceModel.Routing.RoutingService" >
<host>
<baseAddresses>
<add baseAddress="http://localhost:8000/routingservice/router"/>
</baseAddresses>
</host>
<endpoint address=""
binding="wsDualHttpBinding"
name="reqReplyEndpoint"
contract="System.ServiceModel.Routing.IRequestReplyRouter"
bindingConfiguration="UnSecureBinding"/>
<endpoint address="mex"
binding="mexHttpBinding"
contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="routingData">
<serviceMetadata httpGetEnabled="True"/>
<serviceDebug includeExceptionDetailInFaults="true" />
<routing filterTableName="routingTable1" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<wsDualHttpBinding>
<binding name="UnSecureBinding">
<security mode="None" />
</binding>
</wsDualHttpBinding>
</bindings>
<client>
<endpoint name="NotificationService"
address="http://localhost/CommServices/NotificationService.svc"
binding="wsDualHttpBinding"
bindingConfiguration="UnSecureBinding"
contract="*" />
</client>
<!--ROUTING SECTION -->
<routing>
<filters>
<filter name="MatchAllFilter1" filterType="MatchAll" />
</filters>
<filterTables>
<filterTable name="routingTable1">
<add filterName="MatchAllFilter1" endpointName="NotificationService" />
</filterTable>
</filterTables>
If I enabling ServiceModel tracing, I can see an ArgumentException deep in the WCF Stack, a trace I´havent followed so far.如果我启用 ServiceModel 跟踪,我可以在 WCF 堆栈深处看到 ArgumentException,这是迄今为止我没有跟踪的跟踪。
Can anyone give a hint into the right direction, or correct me If my assumptions concerning the callback capabilities of the RoutingService are wrong.如果我对 RoutingService 回调功能的假设是错误的,任何人都可以给出正确方向的提示,或者纠正我。
TIA & Cheers Dominik TIA & 干杯多米尼克
In case someone stumbles like I did, the problem was the contract on the router endpoint.万一有人像我一样绊倒,问题是路由器端点上的合同。 RequestReplyRouter does not support callbacks but IDuplexSessionRouter does.
RequestReplyRouter 不支持回调,但 IDuplexSessionRouter 支持。
<endpoint address=""
binding="wsDualHttpBinding"
name="reqReplyEndpoint"
contract="System.ServiceModel.Routing.IDuplexSessionRouter"
bindingConfiguration="UnSecureBinding"/>
Regards Dominik问候多米尼克
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.