I have a service app that creates AppDomain's during the course of its use for long running tasks. I've been tracking these by storing them in a Hashtable with a unique ID.
After a task is completed the service app then unloads the AppDomain allocated to that task and then it's removed it from the appdomain Hashtable.
Purely from a sanity checking point of view, is there a way I can query the CLR to see what app domains are still loaded by the creating app domain (i.e. so I can compare the tracking Hashtable against what the CLR actually sees)?
Thanks in advance.
Kev