日期:2014-05-17  浏览次数:20380 次

WCF双工通讯,报无法调用错误
刚开始学习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>


------解决方案--------------------
一.不明白什么是双工通信,读通信专业的表示不知道双工通信是啥玩艺
二.从来没搞过配置文件,老了,除了wcf config,还n多config记不住
三.你可以看下我的博客,建一个wcf服务
http://blog.csdn.net/avi9111/article/details/7493329