简体   繁体   中英

WCF Error (Timeout)

I have a client and WCF service running..

When a client tried to talk to WCF (ie getting a result from WCF), it throws the exception below..

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'.

So, I did search on Google and found threads on 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'.

When I debug the WCF Service, it is actually not taking long at all. 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>元素来解决。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM