DirectoryEntry Help
From: Faraz Khan (faraz.khan@ezdoc.net)
Date: 04/03/03
- Next message: yang: "ticket and cookie problem"
- Previous message: Guogang: "CertMgr"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: faraz.khan@ezdoc.net (Faraz Khan) Date: 2 Apr 2003 19:30:10 -0800
Please help. I am trying to run the following code in a ASP.NET page.
Line 1: Dim DS As New
System.DirectoryServices.DirectoryEntry("LDAP://RootDSE", "fkhan",
"mypassword", DirectoryServices.AuthenticationTypes.Secure)
Line 2: Dim DNC As String = DS.Invoke("Get", "DefaultNamingContext")
Generates this error at Line 2:
System.Runtime.InteropServices.COMException (0x8007054B): The
specified domain either does not exist or could not be contacted.
Now. I understand that this code will run under the security context
of ASPNET account, which does not have access to the Active Directory.
But why does it not work when i am specifaclly providing my own login
and password to the DirectoryEntry constructor? I keep getting the
above error. I have tried other forms of my username (e.g.
"domain\fkhan" or "cn=fkhan") to no avail. The user name or password
is correct becasue I have used it as a test elsewhere to Impersonate
my account, which then makes the above code work, after giving
SeTcbPrivilege to the ASPNET account.
This code must run on a public webserver so there is no option for
Integrated or Basic authentication. I can make it work by using
impersonation, but i dont want to alter ASPNET's previleges or IIS
settings (e.g. running the code under a domain account instead of
ASPNET).
- Next message: yang: "ticket and cookie problem"
- Previous message: Guogang: "CertMgr"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|