471,343 Members | 1,231 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,343 software developers and data experts.

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

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.