Permission denied: 'GetObject'

Discussion in 'ASP General' started by CJM, Sep 30, 2004.

  1. CJM

    CJM Guest

    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
    CJM, Sep 30, 2004
    #1
    1. Advertising

  2. CJM

    Hermes Guest

    Sounds similar to a problem I had with this. If i remember correctly it was
    down to user permissions on the active directory container, we had read
    only access to everyone and that worked but it was taken off and we just got
    the same error as you.
    What we did was to change the user in IIS with a user which had domain admin
    rights (or atleast read rights to the active directory).
    Might not be the best way round it but it was an internal project and
    security of this didnt cause us a problem.
    Hope this helps.

    Cheers,
    Rob

    "CJM" <> wrote in message
    news:...
    > 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
    >
    >
    Hermes, Sep 30, 2004
    #2
    1. Advertising

  3. Hi CJM,

    I'm viewing this post and find that this is a duplicated one with another
    thread in the
    microsoft.public.inetserver.iis

    newsgroup, another member of MSFT has replied you there. You may have a
    look. In addition, if you feel
    it convenient that we continue to discuss in that thread, please feel free
    to post there. Thanks.

    Regards,

    Steven Cheng
    Microsoft Online Support
    Steven Cheng[MSFT], Oct 1, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ]-[aTc]-[

    Getobject C# Equevlent

    ]-[aTc]-[, Jul 16, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    11,215
    Craig Deelsnyder
    Jul 17, 2004
  2. Delia
    Replies:
    4
    Views:
    791
    Michael Borgwardt
    Nov 19, 2004
  3. LittlePython

    Try/Except for ADSI GetObject

    LittlePython, May 31, 2006, in forum: Python
    Replies:
    1
    Views:
    486
    Roger Upole
    Jun 1, 2006
  4. Hakan
    Replies:
    6
    Views:
    442
    Hakan
    Jan 30, 2004
  5. joe

    getobject permission denied

    joe, May 16, 2006, in forum: ASP General
    Replies:
    1
    Views:
    151
    Evertjan.
    May 16, 2006
Loading...

Share This Page