[Mono-dev] Cross-Appdomain remoting

Robert Jordan robertj at gmx.net
Thu May 5 16:49:45 EDT 2011


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 ()
> [0x00000] 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

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



More information about the Mono-devel-list mailing list