WCF路由服务不使用回调路由wsDualHttpBinding
我使用.Net 4.0路由服务使用回调连接到服务时遇到问题。据我了解,路由服务支持绑定和回调。仅服务和客户运营良好。WCF路由服务不使用回调路由wsDualHttpBinding
我做了什么,正在采取设在这里的MS WCF和WF样品:http://www.microsoft.com/downloads/en/details.aspx?FamilyID=35ec8682-d5fd-4bc3-a51a-d8ad115a8792&displaylang=en
和更改配置,以配合我的服务的结合。我可以通过从客户端到服务的路由服务调用操作,客户端不会收到从服务到客户端的回调。
路由服务被配置如下,使用一个控制台应用程序作为宿主
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>
如果我使ServiceModel跟踪,我可以看到一个ArgumentException深在WCF Stack中,至今为止我追踪了一下。
任何人都可以提示正确的方向,或纠正我如果我对有关RoutingService的回调能力的假设是错误的。
TIA &干杯 多米尼克
,以防有人跌倒像我一样,问题是在路由器端点的合同。 RequestReplyRouter不支持回调,但IDuplexSessionRouter可以。
<endpoint address=""
binding="wsDualHttpBinding"
name="reqReplyEndpoint"
contract="System.ServiceModel.Routing.IDuplexSessionRouter"
bindingConfiguration="UnSecureBinding"/>
问候 多米尼克
是的,那正是我期望的问题...... :) – 2011-06-06 08:15:27
你是如何配置你的路由服务?不要指望人们会下载任何东西来理解你的问题。修改您的问题并添加路由服务的配置。 – 2011-06-05 18:45:53
嗨拉迪斯拉夫和感谢您的评论,解开了这个问题。 – Dominik 2011-06-06 06:32:28