I wrote some code that would let me authenticate via Active Directory or a WinNT Member Directory. When I first ran this code below, everything worked fine. An hous later it diddnt. I am getting this error description: "The system cannot find the path specified."
In the time between it working and not working, there was no change to the code what-so-ever.
ADSIProvider = "WinNT:"
UserName = Request.Form("UserID")
UserPass = Request.Form("Password")
Dim oSec
Dim sChckID
If LoadContent(oSec, "Security", Application("AdminData"), True, "", "Title ASC") Then
sDomain = oSec("Domain")
sGroup = oSec("Container")
UserAcct = sDomain & "\" & UserName
'On Error Resume Next
Set oUser = GetObject(ADSIProvider)
Set oDsUser = oUser.OpenDSObject(ADSIProvider & "//" & sDomain & "/" & UserName & ",user", _
UserAcct, UserPass, 1)
If err.Number = 0 Then
For each group in oDsUser.groups
If group.name = sGroup Then
If LoadContent(oAdmins, "Division Admins", Application("AdminData"), True, "", "[Division Name] ASC") Then
sChckID = Trim(Request.Form("UserID"))
sFilter = "UserID = '" & sChckID & "'"
oAdmins.Filter = sFilter
sUserID = oAdmins("UserID")
If UserName = sUserID Then
If Trim(Session("DivisionDisplay")) = oAdmins("Division") Then
Session("DisplayName") = oDsUser.Fullname
Session("DivisionDisplay") = Trim(Request("Divisions"))
Session("WACDivisionAdminUserId") = Trim(Session("DivisionDisplay"))
Response.Redirect "../index.asp"
Else
Response.Redirect "Login.asp?Err=" & err.helpfile & ""
End If
Else
Response.Redirect "Login.asp"
End If
End If
Else
Response.Redirect "Login.asp?Err=" & err.helpfile & ""
End If
Next
Else
Response.Redirect "Login.asp?Err=" & err.helpfile & ""
End If
End If
Set oDsUser = Nothing
Set oUser = Nothing
Can someone help?
Thanks
Jared Wuliger
jared@oxcyon.com
www.oxcyon.com