LDAP servername (VB.NET/ASP.NET)

  • Thread starter Thread starter Christina
  • Start date Start date
C

Christina

Hello!!
I have been researching on this for a while. If someone can show me a
pointer it would be great.

I have an LDAP server on my local machine.

I am creating a new instance of DirectoryEntry using:

New DirectoryEntry("LDAP://" & ldapServerName & _
"/dc=anydomain,dc=com", "anyusername", "anypassword",
AuthenticationTypes.None)

Can anyone explain me what exactly do i have to pass in the servername
?
I tried passing :

localhost
127.0.0.1
localhost:389
127.0.0.1:389

But every time, it shows some error or the other. Some of these errors
are:
Server not available
some number 00x80005000 etc..

TIA
 
Hi,

Use this static property in the place of the first argument, all the
things will be take care by domain class..
System.DiagnoticService.ActiveDirectory.Domain.GetCurrentDomain().GetDomainEnry().path


all the best .
 
Thanks !!
I am using framework 1.1. Couldnt apply the solution in my framework. I
believe its for framework 2.0. Is there some way I can apply it on
framework 1.1 ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top