M
Maqsood Ahmed [MCAD .NET]
Environment:
Windows XP, .NET/ASP .NET 2.0
I am developing an intranet application for my company. I want to use LDAP
to get the existing users of the company and allow them access according to
their roles. I have set identity impersonation = true and authentication mode
= "Windows" in the Web.config file of the application.
I get an COMException whenever I try to access LDAP objects using the
DirectoryEntry class. It only happens when I use it through IIS. it works
fine with ASP .NET Development Server. Please note that I am using Serverless
binding.
The exception message is like the following:
System.Runtime.InteropServices.COMException (0x8007054B): The specified
domain either does not exist or could not be contacted.
I have also tried to assign a domain account as the Anonymous account for
the Virtual Direcotry, but it didn't help either.
Can anyone of you please let me know that what should I do to get it
working. Should I always provide the domain name, username and password to
access the LDAP objects, can't it be used via anonymous access?
Windows XP, .NET/ASP .NET 2.0
I am developing an intranet application for my company. I want to use LDAP
to get the existing users of the company and allow them access according to
their roles. I have set identity impersonation = true and authentication mode
= "Windows" in the Web.config file of the application.
I get an COMException whenever I try to access LDAP objects using the
DirectoryEntry class. It only happens when I use it through IIS. it works
fine with ASP .NET Development Server. Please note that I am using Serverless
binding.
The exception message is like the following:
System.Runtime.InteropServices.COMException (0x8007054B): The specified
domain either does not exist or could not be contacted.
Code:
DirectoryEntry de = new DirectoryEntry();
string domainName = de.Name; //This line generates exception
I have also tried to assign a domain account as the Anonymous account for
the Virtual Direcotry, but it didn't help either.
Can anyone of you please let me know that what should I do to get it
working. Should I always provide the domain name, username and password to
access the LDAP objects, can't it be used via anonymous access?