Authentication Issue

Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default Authentication Issue

    For some reason, even though my php script does require and prompts the user
    for authentication, the page still loads slowly in the background. Normally
    authentication windows pop up before the page starts to load and only loads
    on correct validation, but in my case it prompts the user, yet the page
    still loads in the background.

    Any ideas?


    Stephen Guest

  2. Similar Questions and Discussions

    1. Scheduled Task Authentication Issue
      I have IIS set up to prompt users to login to the domain in order to access the Intranet. In order to get scheduled tasks to run, I have to place...
    2. CF - windows authentication issue
      In the process of upgrading company intranet from Windows 2000 server w/ Coldfusion 4.0 (GASP!) to Windows 2003 server w/ Coldfusion MX 6.1... ...
    3. Integrated Authentication Issue
      I have a web application using asp.net that uses integrated windows authentication. One of our users changed their windows login information. ...
    4. SQL Server authentication issue
      I'm just learning how to incoroporate SQL Server databases into a Visual Basic .NET Web Forms application. On my development machine, I created a...
    5. Newbie Hello World Authentication Issue
      Hi... Real dumb question here, I'm sure: Setting up my first Hello World ASP.Net app...I can get it to run from the server machine that I am...
  3. #2

    Default Re: Authentication Issue

    On Tue, 22 Jul 2003 22:39:08 GMT, "Stephen" <stephengpope@yahoo.com> wrote:
    >For some reason, even though my php script does require and prompts the user
    >for authentication, the page still loads slowly in the background. Normally
    >authentication windows pop up before the page starts to load and only loads
    >on correct validation, but in my case it prompts the user, yet the page
    >still loads in the background.
    >
    >Any ideas?
    None, without a (minimal!) cut-down piece of code that demonstrates the
    problem, along with web server brand and version, and PHP version.

    --
    Andy Hassall (andy@andyh.co.uk) icq(5747695) ([url]http://www.andyh.co.uk[/url])
    Space: disk usage analysis tool ([url]http://www.andyhsoftware.co.uk/space[/url])
    Andy Hassall Guest

  4. #3

    Default Authentication issue

    Hi, I have been stuck on something for a few days ... I
    have some code that is working on a domain controller but
    not a member server. Running on a DC is not an option, so
    I must get it to work on the member server. I figured no
    problem, I will just provide domain user credentials in my
    code .... well, it has not been so easy. I run into one
    of two problems, when I don't provide credentials (when
    running on the member server) I get:

    Provider (0x80004005)
    Unspecified error

    when I do provide credentials, I get:

    Provider (0x80040E09)
    Permission denied.

    Can someone tell what I am doing wrong ... or perhaps show
    me another way to do this? Thanks in advance.

    - doug

    ---------------------------------------
    <%

    sUserAccountName = "user10"

    Dim oRootDSE
    Set oRootDSE = GetObject ("LDAP://rootDSE")
    sADsPath = oRootDSE.Get("defaultNamingContext")
    Set oRootDSE = Nothing

    <!--END CALLOUT A-->


    <!--BEGIN CALLOUT B-->

    Dim oConnection, oCommand, oRecordSet
    Set oConnection = CreateObject("ADODB.Connection")
    oConnection.Provider = "ADsDSOObject"
    'oConnection.Properties("User ID") = "user1"
    'oConnection.Properties("Password") = "pass"
    'oConnection.Properties("Encrypt Password") = True

    oConnection.Open "Active Directory Provider"
    Set oCommand = CreateObject("ADODB.Command")
    Set oCommand.ActiveConnection = oConnection
    oCommand.CommandText = _
    "SELECT
    samAccountName,mail,displayname,userprincipalname
    FROM 'LDAP://" & _
    sADsPath & "'" & "WHERE samAccountName ='"
    & _
    sUserAccountName & "' AND
    objectCategory='Person'"

    Set oRecordSet = oCommand.Execute
    If not oRecordSet.EOF Then
    Response.Write oRecordSet.Fields("mail")
    & "<BR><BR>"
    Response.Write oRecordSet.Fields
    ("userprincipalname") & "<BR><BR>"
    Response.Write oRecordSet.Fields
    ("displayname") & "<BR><BR>"
    End If
    oConnection.Close
    Set oConnection=Nothing
    Set oCommand=Nothing
    Set oRecordSet=Nothing



    %>
    doug Guest

  5. #4

    Default authentication issue


    Hi, I have been stuck on something for a few days ... I
    have some code that is working on a domain controller but
    not a member server (running on a DC is not an option, so
    I must get it to work on the member server). I figured no
    problem, I will just provide domain user credentials in my
    code .... well, it has not been so easy. I run into one
    of two problems, when I don't provide credentials (when
    running on the member server) I get:

    Provider (0x80004005)
    Unspecified error

    when I do provide credentials, I get:

    Provider (0x80040E09)
    Permission denied.

    Can someone tell what I am doing wrong ... or perhaps show
    me another way to do this? Thanks in advance.

    - doug

    ---------------------------------------
    <%

    sUserAccountName = "user10"

    Dim oRootDSE
    Set oRootDSE = GetObject ("LDAP://rootDSE")
    sADsPath = oRootDSE.Get("defaultNamingContext")
    Set oRootDSE = Nothing

    <!--END CALLOUT A-->


    <!--BEGIN CALLOUT B-->

    Dim oConnection, oCommand, oRecordSet
    Set oConnection = CreateObject("ADODB.Connection")
    oConnection.Provider = "ADsDSOObject"
    'oConnection.Properties("User ID") = "user1"
    'oConnection.Properties("Password") = "pass"
    'oConnection.Properties("Encrypt Password") = True

    oConnection.Open "Active Directory Provider"
    Set oCommand = CreateObject("ADODB.Command")
    Set oCommand.ActiveConnection = oConnection
    oCommand.CommandText = _
    "SELECT samAccountName,mail,displayname,userprincipalname
    FROM 'LDAP://" & _
    sADsPath & "'" & "WHERE samAccountName ='" & _
    sUserAccountName & "' AND objectCategory='Person'"

    Set oRecordSet = oCommand.Execute
    If not oRecordSet.EOF Then
    Response.Write oRecordSet.Fields("mail") & "<BR><BR>"
    Response.Write oRecordSet.Fields("userprincipalname") &
    "<BR><BR>"
    Response.Write oRecordSet.Fields("displayname") & "<BR><BR>"
    End If
    oConnection.Close
    Set oConnection=Nothing
    Set oCommand=Nothing
    Set oRecordSet=Nothing



    %>


    Doug Partridge Guest

  6. #5

    Default Re: authentication issue

    "Doug Partridge" <douglas_partridge@_nospam_.yahoo.com> wrote in message
    news:%23U2lbeDkDHA.1084@tk2msftngp13.phx.gbl...
    >
    > Hi, I have been stuck on something for a few days ... I
    > have some code that is working on a domain controller but
    > not a member server (running on a DC is not an option, so
    > I must get it to work on the member server). I figured no
    > problem, I will just provide domain user credentials in my
    > code .... well, it has not been so easy. I run into one
    > of two problems, when I don't provide credentials (when
    > running on the member server) I get:
    >
    > Provider (0x80004005)
    > Unspecified error
    >
    > when I do provide credentials, I get:
    >
    > Provider (0x80040E09)
    > Permission denied.
    You should make sure that your IWAM and your IUSR account have sufficient
    privilige to access the active directory. Since these accounts default to
    the local accounts database, they have not been granted access to the LDAP
    database. So this requires resetting the IWAM & IUSR account
    You can change them using the scripts in \inetpub\adminscripts\adsutil.vbs

    An other, less efficient trick is to authenticate in code and not to use
    anonymous LDAP connections...

    > Can someone tell what I am doing wrong ... or perhaps show
    > me another way to do this? Thanks in advance.
    >
    > - doug
    >
    > ---------------------------------------
    > <%
    >
    > sUserAccountName = "user10"
    >
    > Dim oRootDSE
    > Set oRootDSE = GetObject ("LDAP://rootDSE")
    > sADsPath = oRootDSE.Get("defaultNamingContext")
    > Set oRootDSE = Nothing
    %>
    >
    >
    Egbert Nierop \(MVP for IIS\) Guest

  7. #6

    Default Re: authentication issue

    Egbert,

    Thanks for responding. I will look into the ADSUTIL option. You mentioned
    that a less efficient option is authenticating via the code. I was
    attempting to do this but could never successfully run the code. I would
    like to know how to do this, or at least what I was doing incorrectly. Do
    you have a code sample that might help (or show me using the code I
    submitted in my original post)? Thanks, Doug

    "Egbert Nierop (MVP for IIS)" <egbert_nierop@nospam.com> wrote in message
    news:ODPtP3XkDHA.2424@TK2MSFTNGP10.phx.gbl...
    > "Doug Partridge" <douglas_partridge@_nospam_.yahoo.com> wrote in message
    > news:%23U2lbeDkDHA.1084@tk2msftngp13.phx.gbl...
    > >
    > > Hi, I have been stuck on something for a few days ... I
    > > have some code that is working on a domain controller but
    > > not a member server (running on a DC is not an option, so
    > > I must get it to work on the member server). I figured no
    > > problem, I will just provide domain user credentials in my
    > > code .... well, it has not been so easy. I run into one
    > > of two problems, when I don't provide credentials (when
    > > running on the member server) I get:
    > >
    > > Provider (0x80004005)
    > > Unspecified error
    > >
    > > when I do provide credentials, I get:
    > >
    > > Provider (0x80040E09)
    > > Permission denied.
    > You should make sure that your IWAM and your IUSR account have sufficient
    > privilige to access the active directory. Since these accounts default to
    > the local accounts database, they have not been granted access to the LDAP
    > database. So this requires resetting the IWAM & IUSR account
    > You can change them using the scripts in \inetpub\adminscripts\adsutil.vbs
    >
    > An other, less efficient trick is to authenticate in code and not to use
    > anonymous LDAP connections...
    >
    >
    > > Can someone tell what I am doing wrong ... or perhaps show
    > > me another way to do this? Thanks in advance.
    > >
    > > - doug
    > >
    > > ---------------------------------------
    > > <%
    > >
    > > sUserAccountName = "user10"
    > >
    > > Dim oRootDSE
    > > Set oRootDSE = GetObject ("LDAP://rootDSE")
    > > sADsPath = oRootDSE.Get("defaultNamingContext")
    > > Set oRootDSE = Nothing
    > %>
    > >
    > >
    >

    Doug Partridge Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139