o***@musiker.nu
2007-04-23 09:12:31 UTC
I have a problem with a client/server remoting application that I have
created. When the client is shut down and restarted within a few
seconds, the following exception is thrown when the server calls the
client trying to update it:
The write operation failed, see inner exception.
Server stack trace:
at System.Net.Security.NegotiateStream.ProcessWrite(Byte[] buffer,
Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.NegotiateStream.Write(Byte[] buffer, Int32
offset, Int32 count)
at
System.Runtime.Remoting.Channels.ChunkedMemoryStream.WriteTo(Stream
stream)
at
System.Runtime.Remoting.Channels.Tcp.TcpClientSocketHandler.GetRequestStream(IMessage
msg, Int32 contentLength, ITransportHeaders headers)
at
System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.SendRequestWithRetry(IMessage
msg, ITransportHeaders requestHeaders, Stream requestStream)
at
System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.ProcessMessage(IMessage
msg, ITransportHeaders requestHeaders, Stream requestStream,
ITransportHeaders& responseHeaders, Stream& responseStream)
at
System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage
msg)
Exception rethrown at [0]:
at Server.Server.UpdateClient()
If the client is restarted after 30 seconds, the problem won't appear.
If the client is shut down and restarted twice within a few seconds
the problem only appears the first time. Does this give anyone a clue
to what may cause this problem? Can this be related to some channel/
port issue? I use TcpChannel and a fix port number.
created. When the client is shut down and restarted within a few
seconds, the following exception is thrown when the server calls the
client trying to update it:
The write operation failed, see inner exception.
Server stack trace:
at System.Net.Security.NegotiateStream.ProcessWrite(Byte[] buffer,
Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.NegotiateStream.Write(Byte[] buffer, Int32
offset, Int32 count)
at
System.Runtime.Remoting.Channels.ChunkedMemoryStream.WriteTo(Stream
stream)
at
System.Runtime.Remoting.Channels.Tcp.TcpClientSocketHandler.GetRequestStream(IMessage
msg, Int32 contentLength, ITransportHeaders headers)
at
System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.SendRequestWithRetry(IMessage
msg, ITransportHeaders requestHeaders, Stream requestStream)
at
System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.ProcessMessage(IMessage
msg, ITransportHeaders requestHeaders, Stream requestStream,
ITransportHeaders& responseHeaders, Stream& responseStream)
at
System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage
msg)
Exception rethrown at [0]:
at Server.Server.UpdateClient()
If the client is restarted after 30 seconds, the problem won't appear.
If the client is shut down and restarted twice within a few seconds
the problem only appears the first time. Does this give anyone a clue
to what may cause this problem? Can this be related to some channel/
port issue? I use TcpChannel and a fix port number.