很奇怪 代码是在家写的。wcf双工 完全好使 没有问题。 但来到单位之后就提示——客户端无法在配置的超时(00:00:00)之内完成安全协商。当前的协商段为 1 (00:00:00) 这个错误。控制台调用wcf都是用localhost 请问是什么原因遭成的?下面是wcf的配置文件
<?xml version="1.0" encoding="utf-8"?>
<configuration>  <system.web>
    <compilation debug="true" targetFramework="4.0" />
  </system.web>
  
  <system.serviceModel>    <services>
      <service name="GL.WcfService.Service1">
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:7871/Service1"/>
          </baseAddresses>
        </host>        <!--协定需要双工,但是绑定“WSHttpBinding”不支持它或者因配置不正确而无法支持它。
        解决方案 将wsHttpBinding转换成wsDualHttpBinding-->
        <endpoint address="" binding="wsDualHttpBinding" contract="GL.WcfService.IService1"/>
      </service>
    </services>
    
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <!-- 为避免泄漏元数据信息,请在部署前将以下值设置为 false 并删除上面的元数据终结点 -->
          <serviceMetadata httpGetEnabled="true"/>
          <!-- 要接收故障异常详细信息以进行调试,请将以下值设置为 true。在部署前设置为 false 以避免泄漏异常信息 -->
          <serviceDebug includeExceptionDetailInFaults="false"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  </system.serviceModel>
  
 <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>
  
</configuration>