[英]WCF Error (Timeout)
I have a client and WCF service running.. 我有一个正在运行的客户端和WCF服务。
When a client tried to talk to WCF (ie getting a result from WCF), it throws the exception below.. 当客户端尝试与WCF交谈(即从WCF获取结果)时,它将在下面引发异常。
The socket connection was aborted. 套接字连接已中止。 This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue.
这可能是由于处理您的消息时出错,远程主机超出了接收超时或潜在的网络资源问题引起的。 Local socket timeout was '00:00:59.9062420'.
本地套接字超时为“ 00:00:59.9062420”。
So, I did search on Google and found threads on Stackoverflow. 因此,我在Google上进行了搜索,并在Stackoverflow上找到了线程。 I tried to increase the timeout on the client as below
我试图增加客户端的超时,如下所示
<netTcpBinding>
<binding name="ServiceEndpoint"
receiveTimeout="00:10:00" sendTimeout="00:10:00" >
<security mode="None" />
</binding>
</netTcpBinding>
And then I got the following error: 然后我得到以下错误:
The socket connection was aborted. 套接字连接已中止。 This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue.
这可能是由于处理您的消息时出错,远程主机超出了接收超时或潜在的网络资源问题引起的。 Local socket timeout was '00:09:59.8593729'.
本地套接字超时为“ 00:09:59.8593729”。
When I debug the WCF Service, it is actually not taking long at all. 当我调试WCF服务时,实际上并不需要很长时间。 It immediately returns a result.
它立即返回结果。 (it only validates the log in information by querying the database and return it immediately).
(它仅通过查询数据库来验证登录信息并立即返回)。 So, my guess is not related to timeout at all.. but I don't know how to resolve it..
因此,我的猜测与超时完全无关。.但是我不知道如何解决。
Please help... 请帮忙...
我有类似的问题,可以通过完全删除<security>元素来解决。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.