I am sending a component inside to the Translation Manager (SDL World Server) using the workflow In which I am calling a TranslationManagerFacade Service to communicate with Translation Manager System. I am trying to call the method inside TranslationManagerFacade service from the client and getting the error below.
ERROR Workflow.SendTranslationActivityWorker - System.ServiceModel.CommunicationException: 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.9990004'. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) at System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing) --- End of inner exception stack trace ---
Server stack trace: at System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing) at System.ServiceModel.Channels.SocketConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout) at System.ServiceModel.Channels.DelegatingConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout) at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.SendPreamble(IConnection connection, ArraySegment`1 preamble, TimeoutHelper& timeoutHelper) at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.DuplexConnectionPoolHelper.AcceptPooledConnection(IConnection connection, TimeoutHelper& timeoutHelper) at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
I increased the timeout to 3 minutes but it still reports the CommunicationException
.
Here is my client code to create the endpoint (I've confirmed I can hit the service over http)
Here is the line of code where the error is generated
public string Translate(string UserId, string title, string publicationId, IEnumerable<string> items, bool includeItemsAlreadyTranslated)
{
string tcpServiceUrl = "net.tcp//MyMachineName:808/TranslationManagerFacade.svc"
NetTcpBinding tcpb = new NetTcpBinding();
tcpb.Security = new NetTcpSecurity() { Mode = SecurityMode.None };
channelFactory = new ChannelFactory<ITranslation>(tcpb);
endpoint = new EndpointAddress(tcpServiceUrl);
client = channelFactory.CreateChannel(endpoint);
return client.Translate(UserId, title, publicationId, items, includeItemsAlreadyTranslated);
}
I am following the blog from Eric Huiza to implement TranslationManagerFacade
Here is the endpoint in TranslationManagerFacade
service is hosted in IIS on the same machine. I can see that client is not null in my code