Ask a Question related to ASP.NET Security, Design and Development.
-
Gary K #1
Binding DirectoryEntry to AD object via GUID
I notice in the help files a reference that implies that you can create a
DirectoryEntry object that binds directly to an active directory object vai
it's GUID. The properties where I found this reference are the Guid and
NativeGuid properties. I cannot locate where or how to do this, the
DirectoryEntry constructors do not seem to take Guid's nor can you set the
NativeGuid, so how can I do this? Is it even possible? I'm asking because I
want to store a link to a user's account infomration in a SQL database so
that supervisors can manipulate user accounts without browsing the AD tree.
Thanks
Gary K Guest
-
Binding a single object to a control
Hi all, This probably sounds like a stupid question, but what is generally the recommended way to display a business object in the aspx file for... -
Properly binding an object to a custom component.
I am apparently not doing this. What am I missing to properly bind an object from a repeater looping over an array of object to the custom... -
How to binding result from remote object to labelcontrol
Hi, I have a Remote Object -select query- and I need to display results in a label control. I know that label control don't have dataProvider ... -
Binding custom object to a listbox
I have a class I wish to enter into a listbox public Class AnswerListItem Public Answer As String Public Order As integer End Class Here... -
Binding IEnumerable derived object
This is more of a why question then how. When I bind a key-value collection to a control, I know to set DataTextField and DataValueField to key... -
Joe Kaplan \(MVP - ADSI\) #2
Re: Binding DirectoryEntry to AD object via GUID
Binding via the GUID is covered here in the docs:
[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnanchor/html/networkdirectoryserv.asp[/url]
The examples are for ADSI, but they apply equally well to S.DS.
Essentially, you can use either the Guid property or the NativeGuid property
to create the binding string. Guid returns a .NET Guid object and
NativeGuid returns a string that contains the same Guid in octet string
format. ADSI accepts either the octet string format or the
Guid.ToString("D").
So to create the binding string, you would do either:
String.Format("LDAP://<{0}>", entry.NativeGuid)
or
String.Format("LDAP://<{0}>", entry.Guid.ToString("D"))
Also, if you get the objectGuid property directly (from either the
DirectoryEntry or a SearchResult), you can cast that to a byte[] and pass
that to the Guid constructor to use the second format above.
Normally, all the S.DS questions are fielded in the adsi.general newsgroup.
HTH,
Joe K.
"Gary K" <GaryK@discussions.microsoft.com> wrote in message
news:5DE99914-A16A-40FA-9AF7-6B53479735F4@microsoft.com...vai> I notice in the help files a reference that implies that you can create a
> DirectoryEntry object that binds directly to an active directory objectI> it's GUID. The properties where I found this reference are the Guid and
> NativeGuid properties. I cannot locate where or how to do this, the
> DirectoryEntry constructors do not seem to take Guid's nor can you set the
> NativeGuid, so how can I do this? Is it even possible? I'm asking becausetree.> want to store a link to a user's account infomration in a SQL database so
> that supervisors can manipulate user accounts without browsing the AD> Thanks
Joe Kaplan \(MVP - ADSI\) Guest
-
Gary K #3
Re: Binding DirectoryEntry to AD object via GUID
Thanks for that, sorry about the mispost.
"Joe Kaplan (MVP - ADSI)" wrote:
> Binding via the GUID is covered here in the docs:
>
> [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnanchor/html/networkdirectoryserv.asp[/url]
>
> The examples are for ADSI, but they apply equally well to S.DS.
>
> Essentially, you can use either the Guid property or the NativeGuid property
> to create the binding string. Guid returns a .NET Guid object and
> NativeGuid returns a string that contains the same Guid in octet string
> format. ADSI accepts either the octet string format or the
> Guid.ToString("D").
>
> So to create the binding string, you would do either:
> String.Format("LDAP://<{0}>", entry.NativeGuid)
> or
> String.Format("LDAP://<{0}>", entry.Guid.ToString("D"))
>
> Also, if you get the objectGuid property directly (from either the
> DirectoryEntry or a SearchResult), you can cast that to a byte[] and pass
> that to the Guid constructor to use the second format above.
>
> Normally, all the S.DS questions are fielded in the adsi.general newsgroup.
>
> HTH,
>
> Joe K.
>
> "Gary K" <GaryK@discussions.microsoft.com> wrote in message
> news:5DE99914-A16A-40FA-9AF7-6B53479735F4@microsoft.com...> vai> > I notice in the help files a reference that implies that you can create a
> > DirectoryEntry object that binds directly to an active directory object> I> > it's GUID. The properties where I found this reference are the Guid and
> > NativeGuid properties. I cannot locate where or how to do this, the
> > DirectoryEntry constructors do not seem to take Guid's nor can you set the
> > NativeGuid, so how can I do this? Is it even possible? I'm asking because> tree.> > want to store a link to a user's account infomration in a SQL database so
> > that supervisors can manipulate user accounts without browsing the AD>> > Thanks
>
>Gary K Guest
-
Joe Kaplan \(MVP - ADSI\) #4
Re: Binding DirectoryEntry to AD object via GUID
No need to apologize. It is pretty unobvious where to post S.DS questions
unless you already know :) MS has so far rejected my requests for an S.DS
newsgroup which would help with this. I was just trying to spread the word
in case you had follow ups.
Joe K.
"Gary K" <GaryK@discussions.microsoft.com> wrote in message
news:B3BA8DCB-B1C0-4A19-BA5C-FB7B904BD1E3@microsoft.com...> Thanks for that, sorry about the mispost.
>
Joe Kaplan \(MVP - ADSI\) Guest



Reply With Quote

