Wrox Home  
Search P2P Archive for: Go

  Return to Index  

security_asp thread: Novell LDAP Authentication


Message #1 by "Scott B" <scott_l_b@h...> on Fri, 2 Feb 2001 17:05:48 -0000
Hello,

I am trying to authenticate to a Novell LDAP server...

I tried modifying code in Chapter 21 of ASP 3.0

It seems something small is wrong.  Any help would be great!

Scott

Below is the modified code:  authenticate.asp


<%
on error resume next

Dim ADsPath
ADsPath = "LDAP://ourldapserver.edu:389"


' attempt to bind while authenticating
Dim oNamespace
Set oNamespace = GetObject("LDAP:")
Dim oObjSec
Set oObjSec = oNamespace.OpenDSObject( ADsPath, "user",  "password", 1)
    
If Err.number <> 0 then
	Response.Write "Problem authenticating to the object" & "<br>"
	Response.Write Err.description & "<br>"
	Response.Write Err.number & "<br>"
Else
	Response.Write "Currently bound to this object:<br>"
	Response.Write "ADsPath: " & oObjSec.ADsPath & "<br>"
	Response.Write "Name: " & oObjSec.Name & "<br>"
	Response.Write "Class: " & oObjSec.Class & "<br>"
	Response.Write "Schema: " & oObjSec.Schema & "<br>"
	Response.Write "Parent: " & oObjSec.Parent & "<br>"
End If
%>

  Return to Index