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?

RE: Remoting and DataTypes by FamilyTreeMike

FamilyTreeMike
Sat Jan 19 14:51:00 CST 2008

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.

"-Steve-" wrote:

> 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?
>
>
>

Re: Remoting and DataTypes by Amar

Amar
Fri Jan 25 21:12:29 CST 2008

On Jan 20, 1:51 am, Family Tree Mike
<FamilyTreeM...@discussions.microsoft.com> wrote:
> 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.
>
> "-Steve-" wrote:
> > 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?

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