I implemented very simple application which creates AppDomain-s in an endless loop and instantiates some simple type. Unfortunately after some time application crashes with following exception:
  "A fatal error has occurred and debugging needs to be terminated. For more details, please see the Microsoft Help and Support web site. HRESULT=0x8007000e. ErrorCode=0x0."
  Here is the code I use to instantiate the type:
  while (true)      
{        
     AppDomain sandBoxedDomain =       
   AppDomain.CreateDomain("Sandboxed Domain");         
     TypeHost host = (TypeHost)      
   sandBoxedDomain.CreateInstanceFromAndUnwrap(      
       typeof(TypeHost).Assembly.GetName().CodeBase,      
       typeof(TypeHost).ToString(), false,         
       System.Reflection.BindingFlags.CreateInstance,       
       null,       
       new object[]       
       { @"C:\Temp\ " },      
       CultureInfo.CurrentCulture, null, null);      
       AppDomain.Unload(sandBoxedDomain);      
        
   Console.Write(" - ok");      
}         
   
   
 
   
  I used VS2008, with build for .NET2.0, .NET3.0 and .NET3.5 and Vista (without SP1).   
Here is official feedback at Microsoft Connect site.
		    
            
	        Posted
		    
Mar 20 2008, 09:37 AM
			by
		    
Damir Dobric