Geeks With Blogs
Prasanna's Blog BizTalk, WCF, C# and Software Factories

i just finished writing Windows service host for my WCF services, there were no crash or exceptions thrown either by client or server,

I was just browing event log to check things were fine, then noticed at end of each call to WCF service, there was a log message with the following exception

System.ServiceModel.CommunicationException occurred
  Message="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:02:00'."
  Source="System.ServiceModel"

ok here is the solution: when using netTcpBinding the service client has to call the close() method of the service in order to relase the instance back to the pool

Agile way to fix this is by change the binding type to WSHttp or BasicHttp. it will work

Happy Programing !!!

Posted on Friday, February 22, 2008 2:10 PM | Back to top


Comments on this post: Socket errors in WCF netTcpBinding

# re: Socket errors in WCF netTcpBinding
Requesting Gravatar...
Try to call these:
((IClientChannel)client).Close();
((IClientChannel)client).Dispose();
Left by Pär Sandgren on Mar 19, 2009 6:09 AM

Your comment:
 (will show your gravatar)


Copyright © Prasanna Krishnan | Powered by: GeeksWithBlogs.net