ASP, ADSI and IIS 6.0 Problem

Discussion in 'ASP General' started by Mike Zehner, Sep 9, 2003.

  1. Mike Zehner

    Mike Zehner Guest

    Hi -

    I wrote an ASP script that adds users to Active Directory. I have been
    running this script sucessfully on Windows 2000 with IIS 5.0 for a couple of
    years now.

    I have been trying unsucessfully for now for some time now trying to get the
    same ASP script to work on Windows 2003 with IS 6.0.

    I am using Windows Integrated Authentication and I am accessing this script
    with Enterprise Admin permissions.

    All I get is a response that says: "HTTP 500 - Internal server error."

    ASP is enabled on this server and I have several applications on here
    working fine. This server was an upgrade from W2K w/IIS 5.0.

    Below is where the script errors, specifically on the last line:

    strLoginTemp = "AUser"
    Set objConnection = Server.CreateObject("ADODB.Connection")
    Set objRecordset = Server.CreateObject("ADODB.Recordset")
    objConnection.Open "Provider=ADsDSOObject;"
    Set objCommand = CreateObject("ADODB.Command")
    objCommand.ActiveConnection = objConnection
    objCommand2.CommandText =
    "<GC://dc=mydomain,dc=com>;(&(objectCategory=person)(objectClass=user)(samAc
    countName=" & strLoginTemp & "));samAccountName;subtree"


    Any advice or examples of how to do this would be greatly appreciated.

    TIA

    Mike
     
    Mike Zehner, Sep 9, 2003
    #1
    1. Advertising

  2. Mike Zehner

    Mike Zehner Guest

    The last line I was refering to should read:

    objCommand.CommandText
    ="<GC://dc=mydomain,dc=com>;(&(objectCategory=person)(objectClass=user)(samA
    ccountName=" & strLoginTemp & "));samAccountName;subtree"

    This was a typo on my part, sorry about that.

    Mike

    "Mike Zehner" <> wrote in message
    news:#...
    > Hi -
    >
    > I wrote an ASP script that adds users to Active Directory. I have been
    > running this script sucessfully on Windows 2000 with IIS 5.0 for a couple

    of
    > years now.
    >
    > I have been trying unsucessfully for now for some time now trying to get

    the
    > same ASP script to work on Windows 2003 with IS 6.0.
    >
    > I am using Windows Integrated Authentication and I am accessing this

    script
    > with Enterprise Admin permissions.
    >
    > All I get is a response that says: "HTTP 500 - Internal server error."
    >
    > ASP is enabled on this server and I have several applications on here
    > working fine. This server was an upgrade from W2K w/IIS 5.0.
    >
    > Below is where the script errors, specifically on the last line:
    >
    > strLoginTemp = "AUser"
    > Set objConnection = Server.CreateObject("ADODB.Connection")
    > Set objRecordset = Server.CreateObject("ADODB.Recordset")
    > objConnection.Open "Provider=ADsDSOObject;"
    > Set objCommand = CreateObject("ADODB.Command")
    > objCommand.ActiveConnection = objConnection
    > objCommand2.CommandText =
    >

    "<GC://dc=mydomain,dc=com>;(&(objectCategory=person)(objectClass=user)(samAc
    > countName=" & strLoginTemp & "));samAccountName;subtree"
    >
    >
    > Any advice or examples of how to do this would be greatly appreciated.
    >
    > TIA
    >
    > Mike
    >
    >
     
    Mike Zehner, Sep 9, 2003
    #2
    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. =?Utf-8?B?SmFtZXMgU2NodWxlcg==?=

    Openquery and ADSI Problem

    =?Utf-8?B?SmFtZXMgU2NodWxlcg==?=, Oct 29, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    3,779
    Scott Allen
    Oct 31, 2004
  2. Mutley

    IIS and ADSI question

    Mutley, Feb 6, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    359
    Mutley
    Feb 6, 2006
  3. Gabriel R
    Replies:
    2
    Views:
    149
    Joe Kaplan \(MVP - ADSI\)
    Dec 2, 2004
  4. Srinivas

    ADSI Authentication Problem in ASP

    Srinivas, Jun 19, 2004, in forum: ASP General
    Replies:
    0
    Views:
    182
    Srinivas
    Jun 19, 2004
  5. Berger, Daniel
    Replies:
    1
    Views:
    187
Loading...

Share This Page