Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / CLR / October 2005

Tip: Looking for answers? Try searching our database.

System.Appdomain.CreateDomain(...) returns __TransparentProxy

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rein.petersen@gmail.com - 12 Oct 2005 20:18 GMT
Hi All,

I wondered if anyone could make sense of this undocumented object
(System.Runtime.Remoting.Proxies.__TransparentProxy) being returned
from the static method call to System.Appdomain.CreateDomain(...).

Normally (in my mono-assembly testing application),
System.Appdomain.CreateDomain(...) returns the documented
System.Appdomain that is expected.

When I stitch the code into my multi-project solution, however, the
call returns a __TransparentProxy that raises exception further on in
code (when I call a member of what is supposed to be the
System.Appdomain object) demanding that all sorts of classes (and their
members!) be marked as serializable.

Any help is greatly appreciated.

Rein
Vadym Stetsyak - 17 Oct 2005 17:34 GMT
How this test application looks like. And where do you call that
CreateDomain(...) in your multiproject solution?

__TransparentProxy indicated that your object is being marshalled from
another aparatment/thread. Does your main thread in the app is marked as
STAThread?

Signature

Vadym Stetsyak aka Vadmyst
http://vadmyst.blogspot.com

> Hi All,
>
[quoted text clipped - 15 lines]
>
> Rein
rein.petersen@gmail.com - 18 Oct 2005 13:11 GMT
Hi Vadym,

Thanks for responding. I should probably clear up this thread with the
fix to the problem.

I wanted to use a separate domain [CreateDomain(...)] so that I could
load and unload assemblies (something that you can't do in the current
domain). My mistake was trying to create my dynamic assembly in a
separate domain because anything inside that domain would need to be
marshalled (by ref or val) to the current domain.

So while System.Appdomain.CreateDomain(...) will always return a
__TransparentProxy, I used the System.Appdomain.Current (property) to
return the current Appdomain that I was able to use to create my
assembly destined for disk.

Elsewhere in the code, I call CreateDomain(...) to create a the
__TransparentProxy to the domain in which I load and unload the saved
assemblies (as needed).

Rein

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.