Access the cross domain users through the Active directory in asp.net.....

109 views
Skip to first unread message

Yogesh Dige

unread,
Feb 10, 2010, 2:47:42 AM2/10/10
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Hi all

i am trying to access the different domain users through the Active
directory throught the asp.net ,C# code as i am running the
apllication on the server through the code it is working properlly but
as i am publishing the same (web application) it is not working. and i
am getting the below exceptin in logs

Exception In SearchResult is
System.DirectoryServices.DirectoryServicesCOMException (0x8007052E):
Logon failure: unknown user name or bad password.

i thought it may be coz of wrong user name and password but the same
user name and password is working through the Code..i stuck with this
from long time.


i am new to AD application so any help is valuable....

Thanks in advance.
With regards
Yogesh DIge

Yogesh Dige

unread,
Feb 19, 2010, 2:49:42 AM2/19/10
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Hi All

Finally i got the solution over this Chrees !!!!!!!!!!!

actually when we are passing the user name to the entry object just
pass the domain name also with the username

actually firstlly i was creating the entry object as below

entry = new DirectoryEntry("LDAP://....", "UserName",
> "******");

but the correct way to pass is =>>

entry = new DirectoryEntry("LDAP://....", "domainname\UserName",
> "******");

which work for me

now i can able to get the cross domain users..

CHEERSSSSSSSS......!!!!!!!!!!!!!! : )

Thanks
Bye

Reply all
Reply to author
Forward
0 new messages