0

クライアントとサーバー間のリモート通信を確立できますが、クライアントが Client Activated リモート可能オブジェクトでメソッドを呼び出すたびに、System.Net.WebException が発生します。

{"The underlying connection was closed: An unexpected error occurred on a receive."}

There is a System.IO.IOException INnerException
{"Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host."}

The stack trace is this:

"\r\nServer stack trace: \r\n   
at System.Runtime.Remoting.Channels.Http.HttpClientTransportSink.ProcessResponseException(WebException webException, HttpWebResponse& response)\r\n   
at System.Runtime.Remoting.Channels.Http.HttpClientTransportSink.ProcessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream, ITransportHeaders& responseHeaders, Stream& responseStream)\r\n   
at System.Runtime.Remoting.Channels.SoapClientFormatterSink.SyncProcessMessage(IMessage msg)\r\n\r\n
Exception rethrown at [0]: \r\n   
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)\r\n   
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)\r\n   
at Remoting.Example.DoSomething() ....
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)\r\n   
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()\r\n   
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)\r\n   
at System.Threading.ThreadHelper.ThreadStart()"
4

1 に答える 1

0

サーバーとクライアントのチャネルを http から tcp に変更したところ、問題は解決しました。

于 2012-10-28T19:26:00.690 に答える