WCF Error

  • Thread starter Thread starter Tom
  • Start date Start date
T

Tom

Hello,

I have a simple WCF client/service solution and I'm trying to call an
operation in the service from the client. However, I get the following
error back:

System.ServiceModel.CommunicationException: The socket connection was
aborted. This coule be caused by an error processing your message or a
receive timeout being exceeded by the remote host, or an underlying network
resource issue. ... An existing connection was forcibly closed by the
remote host at ...

I'm using NetTcpBinding in both the client and the service and I'm
configuring it via code:

NetTcpBinding b = new NetTcpBinding(SecurityMode.None);
b.Security.Mode = SecurityMode.None;
b.Security.Transport.ClientCredentialType = TcpClienCredentialType.None;
b.Security.Message.ClientCredentialType = MessageCredentialType.None;

As you can see, I'm using SecurityMode.None. I even have those extra
redundant security lines that probably don't do anything since I passed in
SecurityMode.None when I created the NetTcpBinding object, but hey, I wanted
to be sure and I have no idea why I'm getting back this error. I've made
sure the Windows firewall is turned off, and I even copied my service over
to another machine and made sure the Windows firewall was turned off there
as well. I still get the same error.

The client comes back after about 5 seconds from trying to send the data
with this error, so it's not a timeout either.

Any other ideas?
Thanks.
 
Tom said:
Hello,

I have a simple WCF client/service solution and I'm trying to call an
operation in the service from the client. However, I get the following
error back:

System.ServiceModel.CommunicationException: The socket connection was
aborted. This coule be caused by an error processing your message or a
receive timeout being exceeded by the remote host, or an underlying
network resource issue. ... An existing connection was forcibly closed
by the remote host at ...

It looks to me that a firewall could be blocking the connection or maybe
some other application on the machine has the port in use.
 
Back
Top