Connecting Tech Pros Worldwide Forums | Help | Site Map

LDAP user authentication problems

pardesiya
Guest
 
Posts: n/a
#1: Jul 19 '07
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


Alexey Smirnov
Guest
 
Posts: n/a
#2: Jul 19 '07

re: LDAP user authentication problems



"pardesiya" <zenstory@gmail.comwrote in message
news:1184818552.671549.268640@e16g2000pri.googlegr oups.com...
Quote:
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://...")


Closed Thread