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.
> 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?
Amar - 26 Jan 2008 03:12 GMT
> 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
[quoted text clipped - 10 lines]
> > 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?
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