I am developing an ASP.NET website. One of its features is authenticating using active directory. At developing time, (right now) i have no access to network with a server computer. So i need to work on my windows 7 ultimate. I downloaded active directory stuffs from microsoft.
When i try to logon my website with ldap address, i get this error:
The specified domain either does not exist or could not be contacted.
To use LDAP address, i need to my windows joined to a domain, Right?
Ok, but my computer is not connected to any network or server computer. Can i define a domain for local computer? How is it?
Or maybe i am trying to login in wrong way. this is my code
bool authenticated = false;
string server = "LDAP://real.domain.com";
DirectoryEntry entry = new DirectoryEntry(server, Environment.UserDomainName + "\\" + user, password);
object nativeObject = entry.NativeObject;
authenticated = true;
catch (DirectoryServicesCOMException cex)
catch (Exception ex)
The code throw exception at DirectoryEntry initializing.