1

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.

1
  • 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. Commented Jan 22, 2013 at 10:01

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.