[英]The socket connection was aborted in wcf
i had created dynamic endpoint in server side and that endpoint used by client side. 我在服务器端创建了动态端点,客户端使用了该端点。
Server side Code: 服务器端代码:
for (int i = 1; i <= 3; i++)
{
host.AddServiceEndpoint(typeof(PokerService.IPlayerService),
new NetTcpBinding(),
@"net.tcp://localhost:5054/player" + i);
}
Client side: 客户端:
NetTcpBinding binding = new NetTcpBinding(SecurityMode.Message);
binding.Name = "NetTcpBinding_IPlayerService";
binding.Security.Message.ClientCredentialType = MessageCredentialType.IssuedToken;
EndpointAddress myEndpointAdd = new EndpointAddress(new Uri("net.tcp://localhost:5054/player1"),
EndpointIdentity.CreateDnsIdentity("pident.cloudapp.net"));
var PlayerChannelFactory = new DuplexChannelFactory<ClientApplication.PlayerService.IPlayerService>(new PlayerHandler(handler, this), binding, myEndpointAdd);
but it give error in this following line : 但它在以下行中给出了错误:
Player loggedIn = PlayerServiceProxy.Login("testuser" + Guid.NewGuid().ToString());
The error is: 错误是:
"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.9870000'." “套接字连接已中止。这可能是由于处理消息时出错或远程主机超出接收超时或基础网络资源问题引起的。本地套接字超时为'00:00:59.9870000'。”
have anyone idea? 谁有任何想法?
It seems like timeout. 好像超时了。 Review your client and service timeouts configuration. 查看您的客户端和服务超时配置。
Also, try to use svcTraceViewer.exe to review wcf trace 另外,尝试使用svcTraceViewer.exe查看wcf跟踪
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.