110,570
社区成员
发帖
与我相关
我的任务
分享
<?xml version="1.0"?>
<configuration>
<system.serviceModel>
<services>
<service name="Microsoft.ADC.Framework.ExceptionService.ExceptionProcess">
<endpoint address="net.tcp://127.0.0.1:8001/ExceptionService"
binding="netTcpBinding"
contract="Microsoft.ADC.Framework.ExceptionService.Contracts.IExceptionService" />
</service>
</services>
</system.serviceModel>
</configuration>
服务器端:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="CalculatorBehavior">
<serviceMetadata httpGetEnabled="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="CalculatorBehavior" name="WWB.SessionfulCalculator.Service.CalculatorService">
<endpoint address="" binding="wsHttpBinding" contract="WWB.SessionfulCalculator.Contract.ICalculator"/>
<host>
<baseAddresses >
<add baseAddress="http://localhost:9999/SessionfulCalculator"/>
</baseAddresses>
</host>
</service>
</services>
</system.serviceModel>
</configuration>
客户端:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<behaviors>
<endpointBehaviors>
<behavior name="calculatorEndpointBehavior">
<clientVia viaUri="http://localhost:8080/SessionfulCalculator"/>
</behavior>
</endpointBehaviors>
</behaviors>
<client>
<endpoint address="http://localhost:9999/SessionfulCalculator" behaviorConfiguration="calculatorEndpointBehavior" binding="wsHttpBinding" contract="WWB.SessionfulCalculator.Contract.ICalculator" name="httpEndPoint"></endpoint>
</client>
</system.serviceModel>
</configuration>