If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Active Directory .Net and Browsing the directory

The following code when embedded in a ASP.NET page allows you to enumerate
through a the network with the rights of the account. When I view this information
in the debug local variables windows I see a property called browseGranted
and if I provide the correct password this is set to a value of true, however,
I can't compile the code and call this property. The only way I've been
able to call it is in the immediate window by typing Debug.Print dr.browseGranted.
Any idea what I should do?

Re: Active Directory .Net and Browsing the directory

There are a lot of things that you can see at debug time that are private to
classes. This is probably one of those.

Another common example is the Request class. In a posted back ASP.NET that
will have a private _form object and a public FORM object. These both hold
the returned form vars, both are accesible in the locals window but only one
in your code.

Pat

"Chris Schrumm" <vb.@127.0.0.1> wrote in message
news:3d56c5d0$1@10.1.10.29...
>
> The following code when embedded in a ASP.NET page allows you to
enumerate
> through a the network with the rights of the account. When I view this
information
> in the debug local variables windows I see a property called browseGranted
> and if I provide the correct password this is set to a value of true,
however,
> I can't compile the code and call this property. The only way I've been
> able to call it is in the immediate window by typing Debug.Print
dr.browseGranted.
> Any idea what I should do?
>
> using System.DirectoryServices;
>
> DirectoryEntry dr = new DirectoryEntry("WinNT://MyDomain", "username",
"password",AuthenticationTypes.Secure);
>
> // this won't compile
> if(dr.browseGranted)
> {
> // send some message
> }