2011-01-12 49 views
0

当有两个不同的机器访问相同的WCF服务是以下错误:错误与Windows服务承载的WCF WPF应用程序通信

Exception throw: 
=+=+ BASE EXCEPTION: 
APLICATION: mscorlib 
ERROR: The socket connection was aborted. This may have 
caused by an error processing your message, a timeout 
reception exceeded by the remote host or by a problem of network resource 
underlying. The local socket timeout was '00: 30:00 '. 
CALLSTACK: 
Server stack trace: 
    in 
System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 
offset, Int32 size, TimeSpan timeout, Boolean closing) 
    in 
System.ServiceModel.Channels.SocketConnection.Read(Byte[] buffer, Int32 offset, 
Int32 size, TimeSpan timeout) 
    in 
System.ServiceModel.Channels.DelegatingConnection.Read(Byte[] buffer, Int32 
offset, Int32 size, TimeSpan timeout) 
    in 
System.ServiceModel.Channels.SessionConnectionReader.Receive(TimeSpan timeout) 
    in 
System.ServiceModel.Channels.SynchronizedMessageSource.Receive(TimeSpan 
timeout) 
    in 
System.ServiceModel.Channels.FramingDuplexSessionChannel.Receive(TimeSpan 
timeout) 
    in 
System.ServiceModel.Channels.FramingDuplexSessionChannel.TryReceive(TimeSpan 
timeout, Message& message) 
    in 
System.ServiceModel.Dispatcher.DuplexChannelBinder.Request(Message message, 
TimeSpan timeout) 
    in 
System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, 
ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) 
    in 
System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage 
methodCall, ProxyOperationRuntime operation) 
    in 
System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) 

Exception rethrown at [0]: 
    in 
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, 
IMessage retMsg) 
    in 
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& 
msgData, Int32 type) 
    in 
Evolution.WCF.Contract.IMenuService.GetFullMenu(Int32 userId, Int32 softwareId) 
    in 
Evolution.CompanyPage.MenuVertical.btn_Menu_Click(Object sender, 
RoutedEventArgs e) =+=+ INNER EXCEPTION: 
APLICATION: System 
ERRO: Was forced to cancel an existing connection by remote host 
CALLSTACK: 
in System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 
size, SocketFlags socketFlags) 
    in 
System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 
offset, Int32 size, TimeSpan timeout, Boolean closing) END INNER EXCEPTION =+=+ 
END BASE EXCEPTION =+=+ =+=+=+=+=+=+=+=+=+=+=+=+ END EXCEPTION 
=+=+=+=+=+=+=+=+=+=+=+=+ 
+0

我无法阅读西班牙文,但是我可以告诉你WCF在遇到问题时会抛出一个通用错误,并且给出的错误消息通常不会指向实际问题。我们可能需要比错误信息更详细的信息来帮助你(最好用英文) – Rachel 2011-01-12 20:45:30

+0

我认为它是葡萄牙语。看起来像一个套接字超时。仔细检查地址和/或尝试将调试器连接到服务器。 – alexdej 2011-01-12 22:15:41

回答

0

在我看来,您有一个超时异常。尝试增加服务的超时选项。

此外,如果您在WCF服务终止的安全性相关设置中遇到问题,有时您可能会得到此异常。尝试禁用它(用于测试目的)并查看您是否仍然遇到问题。有关如何禁用它的更多信息here

相关问题