473,322 Members | 1,347 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

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.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)(obje ctClass=user)(samAc
countName=" & strLoginTemp & "));samAccountName;subtree"
Any advice or examples of how to do this would be greatly appreciated.

TIA

Mike
Jul 19 '05 #1
2 3482
The last line I was refering to should read:

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

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

Mike

"Mike Zehner" <mz*****@hotmail.com> wrote in message
news:#h**************@TK2MSFTNGP10.phx.gbl...
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)(obje ctClass=user)(samAc countName=" & strLoginTemp & "));samAccountName;subtree"
Any advice or examples of how to do this would be greatly appreciated.

TIA

Mike

Jul 19 '05 #2
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.
Jul 4 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Kevin Otte | last post by:
Hi everyone, I'm pretty new to using the COM functionality in PHP. I want to administer my PC using PHP together with ADSI. My first problem is to enumerate the groups in my domain. I tried...
9
by: Sophia | last post by:
I need to authenticate users to enter in a NTLM-protected virtual directory, but I can't pop up a NT-login dialogue box - I can only do a web-based username/password form (my client is a...
4
by: Akhlaq Khan | last post by:
we are developing an intranet application (web based) which needs to detect the logged in user ID of the user hitting the website. the intranet is huge and based on win2k active directory (around...
1
by: Ryan Ritten | last post by:
I was wondering if anyone knew how (or if it's even possible) to cache the results of an ADSI call in asp for a longer period of time. Basically what I am doing is I have a website that loads the...
14
by: Arran Pearce | last post by:
Hi, I am looking for a way to use System.DirectoryServices to find all users on a domain whos accounts are either locked out or disabled. I have used ADSIEdit and the mmc schema add-in to try...
8
by: msnews.microsoft.com | last post by:
I have ADSI code that I can make work at the command line. I cannot in any way get it to work in asp.net. Even using Windows authentication, impersonation on, and providing the credentials...
3
by: chat_devil | last post by:
hi, does anyone know if it is possible to remove an attribute that can not be read into the ADSI property cache/collection. i'm trying to do an eDirectory password change from .net directory...
1
by: LittlePython | last post by:
I am a little confused on why I can not detect an object that does not exist with a try and except. If I understand ADSI correctly from what I have read you do not create these objects but rather...
1
by: zmunoz | last post by:
I am working on a script using ADSI via COM in PHP. The script works for the most part when I query a user using the following function: function passwordExpires($userDN) { $comLDAP = new...
8
by: John | last post by:
Hi, gurus, How can I implement the following feature in C#: Set objGroup = GetObject("WinNT://" & strComputer & "/" & strGroup & ", group") For Each objMember In objGroup.Members...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.