wcf路由服务

时间:2011-08-05 11:01:51

标签: .net wcf

问题......如何公开我的Wcf服务的端点,从路由器服务到客户端...... 我的路由服务只将IRequestReplyRouter暴露给我的客户端。我希望我的路由服务能够暴露我服务的端点...... 路由器服务web.config如下

      <?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.web>
<compilation debug="true" />
    </system.web>
   <system.serviceModel>
<services>
  <service name="System.ServiceModel.Routing.RoutingService" behaviorConfiguration="routing">
    <endpoint address=""  binding="basicHttpBinding" contract="System.ServiceModel.Routing.IRequestReplyRouter"/>
  </service>
</services>
<behaviors>
  <serviceBehaviors>
    <behavior name="routing">
      <routing filterTableName="filtertables"/>
      <serviceMetadata httpGetEnabled="True"/>
      <serviceDebug includeExceptionDetailInFaults="False" />
    </behavior>
  </serviceBehaviors>
</behaviors>
<routing >
  <filterTables>
    <filterTable name="filtertables"  >
      <add filterName="all" endpointName="WCF_QtrwiseSalesService" />
    </filterTable>
  </filterTables>
  <filters>
    <filter name="all" filterType="MatchAll"/>
  </filters>
</routing>
<client>
  <endpoint
                 name="WCF_QtrwiseSalesService" binding="netTcpBinding"
                  address="net.tcp://localhost:8523/Design_Time_Addresses/BackUpList1/Service1/"
                  contract="*">
  </endpoint>
</client>

1 个答案:

答案 0 :(得分:0)

检查以下MSDN thread,它可能对您有所帮助,但根据我使用WCF RoutingService的经验,我不会投入太多精力,除非您的要求是完全必须的