I've got a wrapper class for MyClass, called RemotableMyClass (which inherits from MarshalByRefObject). I've got an object that is not marked as serializable I'm using inside MyClass (which implements ISerializable to "take care" of that). In the server, I have... In the client, I have... MyClass mc = new MyClass(); Why do I receive a serialization error about the public MyClass (SerializationInfo info, StreamingContext context)
ChannelServices.RegisterChannel(new HttpChannel(1234));
RemotingConfiguration.ApplicationName = "MyTest";
ObjRef objRef = RemotingServices.Marshal(instantiationOfRemotableMyClass, "MyTest");
RemotingConfiguration.RegisterWellKnownClientType(typeof(RemotableMyClass), "http://localhost:1234/MyTest");
RemotableMyClass rmc = new RemotableMyClass();
mc.ObjectNotMarkedAsSerializable.someProperty = 2;
rmc.MyClass = mc;
ObjectThatIsNotMarkedAsSerializable MyClass serializes and deserializes fine when using a BinaryFormatter.
[Serializable]
public class MyClass : ISerializable
{
public ObjectNotMarkedAsSerializable obj = new ObjectNotMarkedAsSerializable;
void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
{
// implementation to serialize ObjectNotMarkedAsSerializable
}
{
// implementation to deserialize ObjectNotMarkedAsSerializable
}
[Serializable]
public class RemotableMyClass : MarshalByRefObject
{
public MyClass myClass;
}
Remoting Serialization Issue
}

Remoting Serialization Issue
Dawa
Mark Philip