客户端无法在配置的超时(00:00:00)之内完成安全协商。当前的协商段为 1 (00:00:00)

qangqang_100 2012-04-25 10:13:37
很奇怪 代码是在家写的。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>
...全文
268 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
qangqang_100 2012-04-26
  • 打赏
  • 举报
回复
问题找到了 原来是我在公司IE用的是代理服务上网的,代理无法将localhost解析到我的机器 所以客户端连不上wcf

111,126

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Creator Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧