LDAP user authentication problems

P

pardesiya

Hi,

I am trying to authenticate website user user with the below code. If
there is no error then I assume user is authenticated.

objRootDSE = GetObject("LDAP://rootDSE")
strADSPath = objRootDSE.Get("rootDomainNamingContext")
objDSObj = GetObject("LDAP:")
objAuth = objDSObj.OpenDSObject("LDAP://" & strADSPath, strDomainUser,
strPswd, 1)

The above code works fine in my PC where I use .NET 2.0 with MS Visual
Web Developer integrated with IIS. But it gives error when I move this
code to Win 2000 server with IIS. It errors in the 1st line itself and
the message is "Cannot create ActiveX component".
Interestingly, the same code works for a simple ASP application in the
same server but not with ASP.NET

Much appreciate any advice what could be missing.

Thanks a lot,
PD
 
G

Guest

pardesiya said:
Hi,

I am trying to authenticate website user user with the below code. If
there is no error then I assume user is authenticated.

objRootDSE = GetObject("LDAP://rootDSE")
strADSPath = objRootDSE.Get("rootDomainNamingContext")
objDSObj = GetObject("LDAP:")
objAuth = objDSObj.OpenDSObject("LDAP://" & strADSPath, strDomainUser,
strPswd, 1)

The above code works fine in my PC where I use .NET 2.0 with MS Visual
Web Developer integrated with IIS. But it gives error when I move this
code to Win 2000 server with IIS. It errors in the 1st line itself and
the message is "Cannot create ActiveX component".
Interestingly, the same code works for a simple ASP application in the
same server but not with ASP.NET

Reference System.DirectoryServices.dll and use the ".NET" way

Imports System.DirectoryServices

Dim myDirectoryEntry As DirectoryEntry
myDirectoryEntry = New DirectoryEntry("LDAP://...")
 

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

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top