# Friday, January 14, 2005
« AppDomain Unhandled Exception | Main | Getting Roped Into Reflection »

I'm currently working on some samples that showcase how best to use shadow copying, set private bin paths and load/use add-ins. I'll start posting these when I get the samples done and come up with a good story around them. My next post, which is almost done, is on Assembly.LoadFrom() and Reflection.

Anyway, I'm curious about what aspects of the CLR Loader and AppDomains that folks are most interested in/confused about. I've seen a bunch of posts on the microsoft.public.dotnet.framework.clr newsgroup that I'm using as a good sample of areas to post on -- hence my first post.

Friday, January 14, 2005 6:39:59 AM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [12]  |  Tracked by:
"debt dsi elimination" (online) [Trackback]
"dance toddler wear" (title) [Trackback]
"842.dlays.info" (842.dlays.info) [Trackback]
"a12.op4el" (a12.op4el) [Trackback]
"38d.siopas" (38d.siopas) [Trackback]
"a97.kiolac.cn" (a97.kiolac.cn) [Trackback]
"fb9.bilaser.cn" (fb9.bilaser.cn) [Trackback]
"998.zzooooo.cn" (998.zzooooo.cn) [Trackback]
"a58.oliasi.cn" (a58.oliasi.cn) [Trackback]

Friday, January 14, 2005 8:23:37 AM (GMT Standard Time, UTC+00:00)
"Anyway, I'm curious about what aspects of the CLR Loader and AppDomains that folks are most interested in/confused about."

One aspect of AppDomains that had me baffled was their relation to remoting. When you want to communicate between appdomains all the aspects of remoting play a role, yet all the documentation of remoting seems to focus on 'real' remoting (between processes or machines).

I can't find the references anymore, but some of the documentation falsely suggested that the whole thing with 'Leases' would not apply to inter-appdomain communication. Well, it does. If I have a propertygrid in a window that somehow accesses an object in a different appdomain, and I don't touch the window for 5 minutes (300 seconds), I get all kinds of errors in the communication because the lease has expired. Yet I know that the 'remote' object is still alive, it is just the lease that timed out.

This kind of issues and surprises pops up when trying to use AppDomains not as containers for separate 'applications', but as integral part of an application. The main reason for doing so is when you need to load 'plugin' assemblies that need the ability to be unloaded. All documentation I can find about this scenario (assemblies that need to be unloaded, for instance to recompile and load a plugin) points to using AppDomains, yet I haven't seen any samples that demonstrate how to do this correctly.
Luc Cluitmans
Friday, January 14, 2005 9:27:27 AM (GMT Standard Time, UTC+00:00)
I have a question: do you think we are ever likely to be able to unload Assemblies from AppDomains?
Samuel Jack
Friday, January 14, 2005 2:50:48 PM (GMT Standard Time, UTC+00:00)
Fusion contexts always create problems - it's possible for the same assembly to get loaded multiple times in the same appdomain but in different contexts, resulting in types that "look" like they can be shared but really can't. A thorough discussion of the different contexts and how to determine which context a given assembly is in would be useful.
David Levine
Monday, January 24, 2005 4:01:13 AM (GMT Standard Time, UTC+00:00)
People are always asking loader releated questions in the ASP.NET groups too, specifically about shadow copying, loading from GAC, and loading anything from outside the bin directory of a web app.
Tuesday, February 01, 2005 9:31:53 PM (GMT Standard Time, UTC+00:00)
From your previous post about unhandled exceptions it sounds like this isn't possible, but is there a way to build a process that recycles individual AppDomains that die from unhandled exceptions? The goal is to not have to tear down the entire process - we just want to tear down and optionally restart the AppDomain that threw the unhandled exception.
Oran
Tuesday, August 22, 2006 9:38:07 AM (GMT Daylight Time, UTC+01:00)
This kind of issues and surprises pops up when trying to use AppDomains not as containers for separate 'applications', but as integral part of an application
Friday, December 08, 2006 10:40:32 PM (GMT Standard Time, UTC+00:00)
what aspects of the CLR Loader and AppDomains that folks are most interested in
Wednesday, June 13, 2007 4:38:16 PM (GMT Daylight Time, UTC+01:00)
how much time have you spent on it?
Sunday, June 17, 2007 4:20:30 PM (GMT Daylight Time, UTC+01:00)
nice to hear... we are waiting to see result
Sunday, July 29, 2007 6:24:10 AM (GMT Daylight Time, UTC+01:00)
Thanks for the post!
Sunday, July 29, 2007 6:25:15 AM (GMT Daylight Time, UTC+01:00)
great post!
Thursday, August 02, 2007 12:25:01 PM (GMT Daylight Time, UTC+01:00)
great post, thanks for the info...
Comments are closed.