【发布时间】:2010-10-10 16:40:35
【问题描述】:
我正在尝试调试 WCF 服务。该客户端过去可以连接,但现在无法连接。 该服务部署到服务器。我可以用浏览器访问服务器的服务页面,我会看到生成客户端的说明。 我使用 svcutil 重新生成了客户端代理和配置文件。
客户端启动,但对服务的第一次调用在 1 分钟超时后返回错误。同时,我可以附加到服务器上运行的服务并单步执行那里的代码。我可以看到我的客户从未注册过。此调用的服务器代码中的断点不会被命中。由于某种原因,我无法进入服务器代码(但我可以将调试器附加到服务器上的服务):
Unable to automatically step into the server.
Connecting to the server machine 'shuttle' failed.
Please install the Visual Studio 2008 Remote Debugger on the
server to enable this functionality.
远程调试器已安装并正在运行,或者当然。 长时间超时后我收到此错误:
Client is unable to finish the security negotiation within the
configured timeout (00:00:00). The current negotiation leg is 1 (00:00:00).
当我设置安全模式=无,并增加超时,错误变为
The open operation did not complete within the allotted timeout of 00:02:00.
The time allotted to this operation may have been a portion of a
longer timeout.
我没有运行任何防火墙,我在 Ethereal 的服务器上看到了请求。我正在查看 TCP 流,但我无法说出协商失败的原因。事件日志中没有任何相关内容。我已经筋疲力尽了,希望能得到提示。
客户端 app.config 包含 svcutil 生成的部分:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.serviceModel>
<bindings>
<wsDualHttpBinding>
<binding name="WSDualHttpBinding_SportRadarDCS"
closeTimeout="00:01:00" openTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:01:00"
bypassProxyOnLocal="false" transactionFlow="false"
hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="524288"
maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8"
useDefaultWebProxy="true">
<readerQuotas
maxDepth="32" maxStringContentLength="8192"
maxArrayLength="16384"
maxBytesPerRead="4096"
maxNameTableCharCount="16384" />
<reliableSession ordered="true"
inactivityTimeout="00:10:00" />
<security mode="Message">
<message clientCredentialType="Windows"
negotiateServiceCredential="true"
algorithmSuite="Default" />
</security>
</binding>
</wsDualHttpBinding>
</bindings>
<client>
<endpoint
address="...."
binding="wsDualHttpBinding"
bindingConfiguration="WSDualHttpBinding_SportRadarDCS"
contract="SportRadarDCS"
name="WSDualHttpBinding_SportRadarDCS">
<identity>
<userPrincipalName value=".. my domain user ..." />
</identity>
</endpoint>
</client>
</system.serviceModel>
</configuration>
【问题讨论】: