Re: [Mono-dev] Cross-Appdomain remoting
Ah! The idea of changing the lifetime was enough info for me to find the cause. Hm, I could swear I saw a difference in behavior between .NET and Mono, but my simplified test case revealed an identical error (with slightly different text) in .NET - that led me to InitializeLifetimeService. I overrode InitializeLifetimeService on the MarshalByRef objects and returned null - this prevents the objects from expiring. Thanks for the reply! - Kipp On Thu, May 5, 2011 at 4:49 PM, Robert Jordan robe...@gmx.net wrote: Hi, On 05.05.2011 22:11, Michael Mudge wrote: I'm seeing strange behavior on our device - AppDomain A has launched AppDomain B, and wired the DomainUnloaded event. I'm seeing that RemotingServices.DisposeIdentity is being called after 5 minutes, and then when AppDomain B unloads itself and the unload event is fired, I get this error: Unhandled Exception: System.Runtime.Remoting.RemotingException: Server for uri '6c9364e7_bf92_4f6d_950d_9cfc5c9a372d/b4c91032_2.rem' not found Server stack trace: at System.Runtime.Remoting.Proxies.RealProxy.GetAppDomainTarget () [0x0] infilename unknown:0 at (wrapper xdomain-dispatch) Manager.Shells.WAppServer:HandleDomainUnload (object,byte[],byte[],string) I *think* that the problem is that the domain unload can't find A. I *think* that the object that can't be found is supposed to be automatically recreated - am I right? If that's true, I'm guessing The proxy won't be recreated. If you want to prevent it from being disposed, you should either change its lifetime (via app.config's system.runtime.remoting element) or call/poll a method periodically. that this can't be done when an AppDomain is being unload... Is that true? Where should I start looking to solve this? Can someone provide a clearer explanation of how this all works? Please explain first (preferably with code) what you're trying to achieve. Robert ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-dev] Cross-Appdomain remoting
I'm seeing strange behavior on our device - AppDomain A has launched AppDomain B, and wired the DomainUnloaded event. I'm seeing that RemotingServices.DisposeIdentity is being called after 5 minutes, and then when AppDomain B unloads itself and the unload event is fired, I get this error: Unhandled Exception: System.Runtime.Remoting.RemotingException: Server for uri '6c9364e7_bf92_4f6d_950d_9cfc5c9a372d/b4c91032_2.rem' not found Server stack trace: at System.Runtime.Remoting.Proxies.RealProxy.GetAppDomainTarget () [0x0] in filename unknown:0 at (wrapper xdomain-dispatch) Manager.Shells.WAppServer:HandleDomainUnload (object,byte[],byte[],string) I *think* that the problem is that the domain unload can't find A. I *think* that the object that can't be found is supposed to be automatically recreated - am I right? If that's true, I'm guessing that this can't be done when an AppDomain is being unload... Is that true? Where should I start looking to solve this? Can someone provide a clearer explanation of how this all works? - Kipp ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Cross-Appdomain remoting
Hi, On 05.05.2011 22:11, Michael Mudge wrote: I'm seeing strange behavior on our device - AppDomain A has launched AppDomain B, and wired the DomainUnloaded event. I'm seeing that RemotingServices.DisposeIdentity is being called after 5 minutes, and then when AppDomain B unloads itself and the unload event is fired, I get this error: Unhandled Exception: System.Runtime.Remoting.RemotingException: Server for uri '6c9364e7_bf92_4f6d_950d_9cfc5c9a372d/b4c91032_2.rem' not found Server stack trace: at System.Runtime.Remoting.Proxies.RealProxy.GetAppDomainTarget () [0x0] infilename unknown:0 at (wrapper xdomain-dispatch) Manager.Shells.WAppServer:HandleDomainUnload (object,byte[],byte[],string) I *think* that the problem is that the domain unload can't find A. I *think* that the object that can't be found is supposed to be automatically recreated - am I right? If that's true, I'm guessing The proxy won't be recreated. If you want to prevent it from being disposed, you should either change its lifetime (via app.config's system.runtime.remoting element) or call/poll a method periodically. that this can't be done when an AppDomain is being unload... Is that true? Where should I start looking to solve this? Can someone provide a clearer explanation of how this all works? Please explain first (preferably with code) what you're trying to achieve. Robert ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list