Hello!

I have found several discussions on serializotion isssues on mutliple
newsgroups but no one provided real guidlines to using serialization in
remoting or any reasonable solution to the problem. MSDN docmentation is
rather poor in that area. My hope is that some more thorough analysis of
that problem would be helpful to many using AppDomains and remoting.

My application works with several AppDomains which are created and unloded
from Default AppDomain. When I try to pass ArrayList containing instances of
class A which holds simple value types as its fields the following exception
is raised:

System.Runtime.Serialization.SerializationException
Cannot find the assembly XYZ, Version=1.0.1624.24659, Culture=neutral,
PublicKeyToken=xyztxyztxyztxyztxyzt.

Server stack trace:
at
System.Runtime.Serialization.Formatters.Binary.BinaryAssemblyInfo.GetAssembl
y()

bla bla bla (this stack trace was posted many times already)

Funny thing is that exception arises only when parameter (ArrayList
containing class A) is passed from proxy stub to other AppDoamin while
methods work perfectly well in opposite direction (proxy can retrieve this
same data structures from class A instance created in other AppDomain).
Class A is marked as serializable, implements ISerializable and special
constructor. I know about serialization issues in remoting, however, never
found similar problem after googling for some time. Error was fixed by
reverting to passing value types through array of methods instead of passing
data structure but it is really tedious and contradicts any basic benefits
of using .NET for remoting.

Any ideas how to solve that?

Jacek