Robert Jordan
8/31/2004 12:24:00 PM
Hi,
> I have tried to mark them with:
> [Serializable]
>
> but when I try to connect to the object I get this exception:
> An unhandled exception of type 'System.Runtime.Remoting.RemotingException'
> occurred in mscorlib.dll
> Additional information: Trying to create a proxy to an unbound type.
probably because one of the fields of the classes you declared
[Serializable] is not serializable (because its type is
not declared [Serializable]).
try using this settings in your App.config. you'll get
the exact exception instead the generic
System.Runtime.Remoting.RemotingException:
<configuration>
<system.runtime.remoting>
<customErrors mode="off" />
</system.runtime.remoting>
</configuration>
> If I derive the object from MarshalByRef everything works fine, except that
> I get a reference instead of the object :)
Well, it is much easier to get an object marshaled by ref
then by value. the reason: marshal by value expects
that the whole object graph of a certain object is serializable,
because the remoting infrastructure has to transfer a copy
of the data over the wire.
bye
Rob
>
> "Robert Jordan" wrote:
>
>
>>Henke wrote:
>>
>>
>>>Hi!
>>>What actions do I have to do in order to get my objects marshaled by value?
>>>For the moment we are using Marshal by reference, so all my object derive
>>>from MarshalByRef.
>>
>>Classes must be serializable to be able to transport them by value.
>>
>>Bye
>>Rob
>>