|
-
July 28th, 2004, 08:06 PM
#1
Verifying Login username and password using acitve directory services
Hi!
I was trying to verify login information of a user to access a web page using active directory services using a code like this
string Path="WinNT://DomainName";
DirectoryEntry entry = new System.DirectoryServices.DirectoryEntryPath,UsrName,Password);
Try{
foreach(DirectoryEntry child in entry.Children)
{
if (child.Name.ToUpper()==UsrName.ToUpper() )
{return true;}
return false;
}
}
catch (Exception et)
{ErrLbl.Text="<strong>" + usrs + " " + et.Message + "</strong>";
return false;
}
which should create the directory entry object and return the child entries
but I am getting this error
Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again
Could anyone please let me know what is going wrong or is there any other way to verify user name and passwords.
I did search the net where there is code using Directorysearcher
which for me is also giving another error like
Provider path does not exist or provider path does not allow searching.
which again doesn't make sence as this path is a valid path.
Can anyone Please help me.
Your help is much appreciated.
Nalina
Last edited by iranew; July 28th, 2004 at 08:12 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|