Remoting and DataTypes

  • Thread starter Thread starter -Steve-
  • Start date Start date
S

-Steve-

I'm dealing with remoting for the first time (.net 2.0). I can succesfully
call methods that return basic data types (string, bool, etc) but I can't
pass more complicated data types (System.DirectoryServices.DirectoryEntry is
specifically what I want to have returned). Am I just out of luck or is
there something I can do to return that data type?
 
It's been a while since I have used remoting, but, I believe the classes used
in the call need to be serialized. DirectoryEntry does not implement
ISerializable, so it therefore fails. I did send some pretty complex classes
so complexity is not the problem.

I'm not sure I would see a reason to send local directory entries via
remoting. Perhaps you should create a utility class that carries the
necessary information from the DirectoryEntry class.
 
It's been a while since I have used remoting, but, I believe the classes used
in the call need to be serialized. DirectoryEntry does not implement
ISerializable, so it therefore fails. I did send some pretty complex classes
so complexity is not the problem.

I'm not sure I would see a reason to send local directory entries via
remoting. Perhaps you should create a utility class that carries the
necessary information from the DirectoryEntry class.

While remoting, the data passed is serialized into a bytestream and
then passed.
As a result every datatype that you want to pass should be
serializable . Since Directory entry is not serializble you need to
create a custom class with necessary information and then pass it
 
Back
Top