Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I have successfully created a class that inherits from MarshallByRefObject.

The above class also implements an interface and is invoked remotely from the main AppDomain. DTOs were also created to ferry information accross.

I have verified as much from the debugger, both on the remote class and the calling domain that the remotely loaded assemblies are not being loaded into the main AppDomain. Again, the remote types/assemblies are not bleeding into the Main AppDomain, verified via a Debug Watch into the AppDomain.CurrentDomain.GetAssemblies().

AppDomain.CurrentDomain.GetAssemblies().Count() //From inside the remote object
121
AppDomain.CurrentDomain.GetAssemblies().Count() //At the client, after RPC call.
13

The remote/temp domain then gets offloaded.

However, I still cannot delete any dll's that was read in the remote domain, what am I missing?

I have also experimented with the variation of:

AppDomain.CurrentDomain.Load(File.ReadAllBytes(_.FullName))

and

Assembly.LoadFrom(_.FullName)

Whichever one I use, the files are still being locked even though as far as I can tell, the assemblies were remotely loaded, and offloaded.

share|improve this question
This shouldn't happen. Try to print the locations of the assembly for each AppDomain to a file and compare the two files to find the intersection. – Panos Rontogiannis Jan 22 at 10:01

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.