ASP, ADSI and IIS 6.0 Problem

M

Mike Zehner

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
 
M

Mike Zehner

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top