Hi everybody,im using a script i got from this forum for authenticating against the ldap server, it works well with iis running on an xp machine but when i try it on a iis running on a 2000 machine it fails,it returns an error and yet im sure the username and password are correct.
Any help will be highly appreciated
The script is as follows
<%@ Language=VBScript %>
<%
on error resume next
const ADS_SECURE_AUTHENTICATION=&h0001
oUsername="ilri\" & trim(Request.Form("username"))
oPassword=trim(Request.Form("password"))
Session ("loggedon")= Request.Form("username")
Session ("password") = oPassword
'reset session variable for application access
Session ("validuser") = 0
'by pass
'response.Redirect("validateDB.asp")
DN="LDAP://172.26.0.218:389/cn=users,dc=cgiarad,dc=org"
Set MyNamespace = GetObject("LDAP:")
Set X = MyNamespace.OpenDSObject(DN, oUserName, oPassword, ADS_SECURE_AUTHENTICATION)
if err.number=0 then
Session("AuthenticatedNetwork") = 1
response.Redirect("validateDB.asp")
else
Session("valid") = 1
response.Redirect("login.asp")
end if
Set MyNamespace = Nothing
Set X = Nothing
%>
Any help will be highly appreciated
The script is as follows
<%@ Language=VBScript %>
<%
on error resume next
const ADS_SECURE_AUTHENTICATION=&h0001
oUsername="ilri\" & trim(Request.Form("username"))
oPassword=trim(Request.Form("password"))
Session ("loggedon")= Request.Form("username")
Session ("password") = oPassword
'reset session variable for application access
Session ("validuser") = 0
'by pass
'response.Redirect("validateDB.asp")
DN="LDAP://172.26.0.218:389/cn=users,dc=cgiarad,dc=org"
Set MyNamespace = GetObject("LDAP:")
Set X = MyNamespace.OpenDSObject(DN, oUserName, oPassword, ADS_SECURE_AUTHENTICATION)
if err.number=0 then
Session("AuthenticatedNetwork") = 1
response.Redirect("validateDB.asp")
else
Session("valid") = 1
response.Redirect("login.asp")
end if
Set MyNamespace = Nothing
Set X = Nothing
%>