.NET Remoting SocketException  
Author Message
r3n





PostPosted: .NET Remoting and Runtime Serialization, .NET Remoting SocketException Top

Hello all,

My console .NET remoting server is crashing randomly and producing this stack trace. Any ideas what I could do to help solve it I think the problem stems from the client not accepting invokations coming back from the server (when an event occurs).

System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

Server stack trace:
   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
   at System.Runtime.Remoting.Channels.RemoteConnection.CreateNewSocket(EndPoint ipEndPoint)
   at System.Runtime.Remoting.Channels.RemoteConnection.CreateNewSocket()
   at System.Runtime.Remoting.Channels.SocketCache.GetSocket(String machinePortAndSid, Boolean openNew)
   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 System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at Rensoft.EventProxy.InvokeLocalEvent(Object sender, EventArgs e)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at System.Delegate.DynamicInvoke(Object[] args)
   at Rensoft.Database.DatabaseManager`1.ThreadedDelegate.DynamicInvoke()
   at Rensoft.Database.DatabaseManager`1.invokeThreadedDelegate(Object args)
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart(Object obj)



.NET Development8  
 
 
VikasGoyal





PostPosted: .NET Remoting and Runtime Serialization, .NET Remoting SocketException Top

hi,

can you publish the code snippet also of your client and server.

http://DotNetWithMe.blogspot.com
vikas goyal



 
 
r3n





PostPosted: .NET Remoting and Runtime Serialization, .NET Remoting SocketException Top

To be honest, not really, as several hundred lines would be neccecary for it to make any sense. Have you yourself ever experienced issues with calling your classes directly using the Activator

I have also considered, creating a wrapper for the entire library, so that code execution would be made redundant. Good idea or bad idea