刚开始学习WCF,按照http://www.cnblogs.com/artech/archive/2007/03/02/661969.html#2381590 里面写一个双工通讯的示例,但是到最后程序能够运行但是无法显示结果,报错提示为:
下面是我WCF的配置文件:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<compilation debug="true" />
</system.web>
<system.serviceModel>
<client>
<endpoint name="CalculatorService" address="http://localhost:8732/Services/CalculatorService" binding="wsDualHttpBinding"
contract="Services.ICalculator" />
</client>
<services>
<service name="CalculatorService">
<endpoint address="" binding="wsDualHttpBinding" contract="Services.ICalculator">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8732/Services/CalculatorService" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceDebug includeExceptionDetailInFaults="False" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>