ASP, ADSI and IIS 6.0 Problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mike Zehner

    ASP, ADSI and IIS 6.0 Problem

    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.CreateOb ject("ADODB.Con nection")
    Set objRecordset = Server.CreateOb ject("ADODB.Rec ordset")
    objConnection.O pen "Provider=ADsDS OObject;"
    Set objCommand = CreateObject("A DODB.Command")
    objCommand.Acti veConnection = objConnection
    objCommand2.Com mandText =
    "<GC://dc=mydomain,dc= com>;(&(objectC ategory=person) (objectClass=us er)(samAc
    countName=" & strLoginTemp & "));samAccountN ame;subtree"


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

    TIA

    Mike


  • Mike Zehner

    #2
    Re: ASP, ADSI and IIS 6.0 Problem

    The last line I was refering to should read:

    objCommand.Comm andText
    ="<GC://dc=mydomain,dc= com>;(&(objectC ategory=person) (objectClass=us er)(samA
    ccountName=" & strLoginTemp & "));samAccountN ame;subtree"

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

    Mike

    "Mike Zehner" <mzehner@hotmai l.com> wrote in message
    news:#hIgkdtdDH A.2560@TK2MSFTN GP10.phx.gbl...[color=blue]
    > 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[/color]
    of[color=blue]
    > years now.
    >
    > I have been trying unsucessfully for now for some time now trying to get[/color]
    the[color=blue]
    > same ASP script to work on Windows 2003 with IS 6.0.
    >
    > I am using Windows Integrated Authentication and I am accessing this[/color]
    script[color=blue]
    > 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.CreateOb ject("ADODB.Con nection")
    > Set objRecordset = Server.CreateOb ject("ADODB.Rec ordset")
    > objConnection.O pen "Provider=ADsDS OObject;"
    > Set objCommand = CreateObject("A DODB.Command")
    > objCommand.Acti veConnection = objConnection
    > objCommand2.Com mandText =
    >[/color]
    "<GC://dc=mydomain,dc= com>;(&(objectC ategory=person) (objectClass=us er)(samAc[color=blue]
    > countName=" & strLoginTemp & "));samAccountN ame;subtree"
    >
    >
    > Any advice or examples of how to do this would be greatly appreciated.
    >
    > TIA
    >
    > Mike
    >
    >[/color]


    Comment

    • gladers
      New Member
      • Sep 2005
      • 3

      #3
      in explorer goto the tools menu > Internet options > Advanced

      untick 'Show friendly HTML error messages' and instead of the HTTP 500 message you'll get something more specific.

      Comment

      Working...