468,746 Members | 1,784 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,746 developers. It's quick & easy.

facing an issue querying AD using C#

Hello,

I am facing an issue while querying Active directory using C# code with
system.DirectoryServices namespace.

Here is the path for my LDAP -
"LDAP://CN=XY - C++/Unix and other, OU=Automatic,OU=DLs,DC=domain,DC=com";

I have replaced the / character with\/- but still is giving error while
querying. Please help me to resolve this.

Also is there any way to query on the distribution lists from a given active
directory path?

Thank you.
Suhas Vengilat

Aug 27 '08 #1
4 1329
Hello Suhas,
"LDAP://CN=XY - C++/Unix and other,
OU=Automatic,OU=DLs,DC=domain,DC=com";
have you tried "LDAP://CN=\"XY - C++/Unix and other\", OU=Automatic,OU=DLs,DC=domain,DC=com";

Regards

Frank

--------------------------------
Frank Werner-Krippendorf
fr***@krippendorf-online.ch
Aug 27 '08 #2
We have Active Directory here, and I am curious as to what all I could do
with it as a developer. I'm not really sure what AD is or what it is for, and
our IT guy doesn't know too much about it either other than how to install
programs on it.

What do you do with AD?

"Suhas Vengilat" wrote:
Hello,

I am facing an issue while querying Active directory using C# code with
system.DirectoryServices namespace.

Here is the path for my LDAP -
"LDAP://CN=XY - C++/Unix and other, OU=Automatic,OU=DLs,DC=domain,DC=com";

I have replaced the / character with\/- but still is giving error while
querying. Please help me to resolve this.

Also is there any way to query on the distribution lists from a given active
directory path?

Thank you.
Suhas Vengilat
Aug 27 '08 #3
What's the error?

For searching AD look at the DirectorySearcher class.

On Aug 27, 6:06*am, Suhas Vengilat
<SuhasVengi...@discussions.microsoft.comwrote:
Hello,

I am facing an issue while querying Active directory using C# code with
system.DirectoryServices namespace.

Here is the path for my LDAP -
"LDAP://CN=XY - C++/Unix and other, OU=Automatic,OU=DLs,DC=domain,DC=com";

I have replaced the / character with\/- but still is giving error while
querying. Please help me to resolve this.

Also is there any way to query on the distribution lists from a given active
directory *path?

Thank you.
Suhas Vengilat
Aug 27 '08 #4
jp2msft,

Everything you can do in the AD tools for managing accounts can pretty
much be done in code.

On Aug 27, 7:41*am, jp2msft <jp2m...@discussions.microsoft.comwrote:
We have Active Directory here, and I am curious as to what all I could do
with it as a developer. I'm not really sure what AD is or what it is for,and
our IT guy doesn't know too much about it either other than how to install
programs on it.

What do you do with AD?

"Suhas Vengilat" wrote:
Hello,
I am facing an issue while querying Active directory using C# code with
system.DirectoryServices namespace.
Here is the path for my LDAP -
"LDAP://CN=XY - C++/Unix and other, OU=Automatic,OU=DLs,DC=domain,DC=com";
I have replaced the / character with\/- but still is giving error while
querying. Please help me to resolve this.
Also is there any way to query on the distribution lists from a given active
directory *path?
Thank you.
Suhas Vengilat
Aug 27 '08 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Greg | last post: by
3 posts views Thread by laurentc via AccessMonster.com | last post: by
reply views Thread by Kidan | last post: by
reply views Thread by =?Utf-8?B?Um9jaw==?= | last post: by
2 posts views Thread by Rey | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.