SetData/GetData doesn't work between AppDomains
I'm using VS2005 and am trying to set a AppDomain property in a new AppDomain prior to launching a program within it. I want to pass in a configuration string which the program can look for.
Here is what I'm currently doing
1. I'm creating an AppDomain2 from the default AppDomain
2. I'm calling SetData and assigning a value for AppDomain2 from the default AppDomain
3. I'm calling ExecuteAssembly for AppDomain2 from the default AppDomain
4. The console application executing in AppDomain2 attempts to retrive the property set by the default domain but it is always empty. Trying to set a value by the program is not avalible to the default AppDomain.
What am I doing wrong? When control returns to the default AppDomain I see that AppDomain2 still has the property set in step 2 but code running in AppDomain2 doesn't appear to be able to access it?
Is there another way of passing information between domains prior to launching a program in AppDomain2?
Thanks,Ty

