D
Dan King
I've created a login page to connect to Active Directory and retrieve a list
of groups.
If someone enters the wrong username/password, the web browser returns this
error:
Provider error '80040e09'
Permission denied.
/ct/useradd.asp, line 45
I would like to be able to retrieve this error and present a "You have
entered invalid information.." page.
If I enter an "On Error Resume Next" line the server CPU just jumps to 100%
utilization and the page never returns anything.
Anyone know how to handle this error so I can push out a login arror page?
Here is my code for the AD connection and request.
'''''''''''''''''''''''''''''''''''
Set objConnection = CreateObject("ADODB.Connection")
objConnection.Provider = "ADSDSOObject"
objConnection.Open "ADs Provider", uName, uPass
Set objCommand = CreateObject("ADODB.Command")
objCommand.ActiveConnection = objConnection
objCommand.CommandText = "<LDAP://" & dcIP & "/" & adOU &
">;(objectCategory=group)" & ";distinguishedName,name;subtree"
Set objRecordSet = objCommand.Execute '<=THIS IS THE LINE THE SERVER HANGS
ON WITH BAD USERNAME/PASSWORD
'''''''''''''''''''''''''''''''''''
Thanks,
Dan
of groups.
If someone enters the wrong username/password, the web browser returns this
error:
Provider error '80040e09'
Permission denied.
/ct/useradd.asp, line 45
I would like to be able to retrieve this error and present a "You have
entered invalid information.." page.
If I enter an "On Error Resume Next" line the server CPU just jumps to 100%
utilization and the page never returns anything.
Anyone know how to handle this error so I can push out a login arror page?
Here is my code for the AD connection and request.
'''''''''''''''''''''''''''''''''''
Set objConnection = CreateObject("ADODB.Connection")
objConnection.Provider = "ADSDSOObject"
objConnection.Open "ADs Provider", uName, uPass
Set objCommand = CreateObject("ADODB.Command")
objCommand.ActiveConnection = objConnection
objCommand.CommandText = "<LDAP://" & dcIP & "/" & adOU &
">;(objectCategory=group)" & ";distinguishedName,name;subtree"
Set objRecordSet = objCommand.Execute '<=THIS IS THE LINE THE SERVER HANGS
ON WITH BAD USERNAME/PASSWORD
'''''''''''''''''''''''''''''''''''
Thanks,
Dan