|
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<bindings>
<netTcpBinding>
<binding name="NetTcpBinding_ICustomer" portSharingEnabled="true">
<security mode="None" />
</binding>
</netTcpBinding>
<basicHttpBinding>
<binding name="BasicHttpBinding_ICustomer">
<security mode="None"/>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost/PremiumCustomerService/PremiumCustomerService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ICustomer" contract="*" name="CustomerServiceLibrary_PremiumCustomerService"/>
<endpoint address="http://localhost/OrdinaryCustomerService/OrdinaryCustomerService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ICustomer" contract="*" name="CustomerServiceLibrary_OrdinaryCustomerService"/>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</client>
<services>
<service behaviorConfiguration="RoutingServiceBehavior" name="System.ServiceModel.Routing.RoutingService">
<host>
<baseAddresses>
<add baseAddress="http://localhost/CustomerService/"/>
</baseAddresses>
</host>
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ICustomer" contract="System.ServiceModel.Routing.IRequestReplyRouter" name="RoutingServiceEndpoint">
</endpoint>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="RoutingServiceBehavior">
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="true"/>
<routing filterTableName="routingRules" routeOnHeadersOnly="False"/>
</behavior>
<behavior name="">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<routing>
<namespaceTable>
<add prefix="cc" namespace="http://schemas.datacontract.org/2004/07/CustomerContract" />
</namespaceTable>
<filters>
<filter name="PremiumCustomerFilter" filterType="XPath" filterData="//cc:CustomerCreditRating = 'Good'"/>
<filter name="OrdinaryCustomerFilter" filterType="XPath" filterData="//cc:CustomerCreditRating = 'Bad'"/>
</filters>
<filterTables>
<filterTable name="routingRules">
<add filterName="PremiumCustomerFilter" endpointName="CustomerServiceLibrary_PremiumCustomerService" priority="0"/>
<add filterName="OrdinaryCustomerFilter" endpointName="CustomerServiceLibrary_OrdinaryCustomerService" priority="0"/>
</filterTable>
</filterTables>
<backupLists>
<backupList name="CustomerBackupList">
<add endpointName="CustomerServiceLibrary_OrdinaryCustomerService"/>
</backupList>
</backupLists>
</routing>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.