C
CJM
I'm building an ASP app that uses Windows Authentication (IWA).
I have an authentication routine that assesses if & how the user can use the
application (see code snippet below). Users of a particular group have full
permissions (configured via IIS) and all other users have read/execute
permissions.
When I call the authentication page from the server on my own PC, everything
seems to work, but I guess this is not a respresentative test. So I
installed the page on my development server and called it again from my own
PC. This time a got an error: Permission denied: 'GetObject' .
The error occurs on the second GetObject call. It seems to point to a
permissions issue, but I'm not sure where to look.
Any ideas?
Cheers
Chris
Code Snippet:
Sub AuthUser()
Dim oGroup, oUser, aUID
If Session("UID") = "" or 1 Then 'remove "or 1" from live system
aUID = Split(Request("LOGON_USER"), "\")
Response.Write aUID(0) & " " & aUID(1)
'Check if aUID(1) holds a value
If UBound(aUID) > 0 Then
Set oGroup = GetObject("WinNT://" & "HEXADEX" & "/" &
"Teconnex_Scope_Users" & ",group")
Set oUser = GetObject("WinNT://" & "HEXADEX" & "/" & aUID(1) & ",user")
<======== Error line.
If oGroup.IsMember(oUser.ADsPath) Then
'User authenticated
Session("UID") = aUID(1)
Session("Name") = oUser.Fullname
Session("Auth") = 1
Else
'Signed in as Guest
Session("UID") = "Guest"
Session("Name") = oUser.Fullname
Session("Auth") = 0
End If
Else
'Other problen so sign in as Guest
Session("UID") = "Guest"
Session("Auth") = 0
End If
End If
End Sub
I have an authentication routine that assesses if & how the user can use the
application (see code snippet below). Users of a particular group have full
permissions (configured via IIS) and all other users have read/execute
permissions.
When I call the authentication page from the server on my own PC, everything
seems to work, but I guess this is not a respresentative test. So I
installed the page on my development server and called it again from my own
PC. This time a got an error: Permission denied: 'GetObject' .
The error occurs on the second GetObject call. It seems to point to a
permissions issue, but I'm not sure where to look.
Any ideas?
Cheers
Chris
Code Snippet:
Sub AuthUser()
Dim oGroup, oUser, aUID
If Session("UID") = "" or 1 Then 'remove "or 1" from live system
aUID = Split(Request("LOGON_USER"), "\")
Response.Write aUID(0) & " " & aUID(1)
'Check if aUID(1) holds a value
If UBound(aUID) > 0 Then
Set oGroup = GetObject("WinNT://" & "HEXADEX" & "/" &
"Teconnex_Scope_Users" & ",group")
Set oUser = GetObject("WinNT://" & "HEXADEX" & "/" & aUID(1) & ",user")
<======== Error line.
If oGroup.IsMember(oUser.ADsPath) Then
'User authenticated
Session("UID") = aUID(1)
Session("Name") = oUser.Fullname
Session("Auth") = 1
Else
'Signed in as Guest
Session("UID") = "Guest"
Session("Name") = oUser.Fullname
Session("Auth") = 0
End If
Else
'Other problen so sign in as Guest
Session("UID") = "Guest"
Session("Auth") = 0
End If
End If
End Sub