473,320 Members | 1,940 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,320 software developers and data experts.

Create new user using IIS/ASP

Hi,

I'm running IIS5 on a Win2K server, and I want to have an ASP page that
creates new users. I have some simple code to test this, but am getting
a "500" error when I run it.

The ASP looks like:

<%

strDomain ="Foo.com"
strUser ="Foo1"

' Create new user with password
Set oDomain = GetObject("WinNT://" & strDomain)
Set oUser = oDomain.Create ("User", strUser)
oUser.SetPassword = "password"
oUser.SetInfo
%>

Just for this testing, I've added IUSR_machinename to the Administrators
group, but am still getting the 500 error.

Can anyone tell me what I'm doing wrong here???

Thanks in advance!!
Jul 19 '05 #1
2 4298
Try using:

oUser.SetPassword "password"

..SetPassword is a method that requires an argument. You're trying to treat
it as a property. That's my interpretation, anyway!

Also, http://www.aspfaq.com/2109

Ray at work

"Ohaya" <ohaya@NO_SPAM.cox.net> wrote in message
news:3FB51ABA.29565DFA@NO_SPAM.cox.net...
Hi,

I'm running IIS5 on a Win2K server, and I want to have an ASP page that
creates new users. I have some simple code to test this, but am getting
a "500" error when I run it.

The ASP looks like:

<%

strDomain ="Foo.com"
strUser ="Foo1"

' Create new user with password
Set oDomain = GetObject("WinNT://" & strDomain)
Set oUser = oDomain.Create ("User", strUser)
oUser.SetPassword = "password"
oUser.SetInfo
%>

Just for this testing, I've added IUSR_machinename to the Administrators
group, but am still getting the 500 error.

Can anyone tell me what I'm doing wrong here???

Thanks in advance!!

Jul 19 '05 #2
Ray,

HOORAY!!!! That worked great!!

Thanks a lot!

(Did I include enough exclamation points in this post :)?)

Jim

"Ray at <%=sLocation%>" wrote:

Try using:

oUser.SetPassword "password"

.SetPassword is a method that requires an argument. You're trying to treat
it as a property. That's my interpretation, anyway!

Also, http://www.aspfaq.com/2109

Ray at work

"Ohaya" <ohaya@NO_SPAM.cox.net> wrote in message
news:3FB51ABA.29565DFA@NO_SPAM.cox.net...
Hi,

I'm running IIS5 on a Win2K server, and I want to have an ASP page that
creates new users. I have some simple code to test this, but am getting
a "500" error when I run it.

The ASP looks like:

<%

strDomain ="Foo.com"
strUser ="Foo1"

' Create new user with password
Set oDomain = GetObject("WinNT://" & strDomain)
Set oUser = oDomain.Create ("User", strUser)
oUser.SetPassword = "password"
oUser.SetInfo
%>

Just for this testing, I've added IUSR_machinename to the Administrators
group, but am still getting the 500 error.

Can anyone tell me what I'm doing wrong here???

Thanks in advance!!

Jul 19 '05 #3

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

Similar topics

5
by: lkrubner | last post by:
I have a webserver through Rackspace. I create a domain. I create an FTP user. I upload some files. I create a database called testOfSetupScript and then I create a database user named setup. I...
8
by: W.Davis | last post by:
Group, I'm using ver 5 with winXP. I can access the test database, but can't create a table. I can't create ANY database as I keep getting error 1044 (42000): Access denied for user: '...
2
by: Keith Jakobs, MCP | last post by:
Greetings: I had seen several posts around the Internet about this issue from a few months back, but have been unable to find a resolution ... I have a user who is trying to get started with...
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
3
by: MLH | last post by:
I was running the following code while logged in as a user belonging only to the Users group. Set usrNew = .CreateUser(Me!UserID) 'The user ID is in a control on the form usrNew.PID =...
6
by: Peter Nurse | last post by:
For reasons that are not relevant (though I explain them below *), I want, for all my users whatever privelige level, an SP which creates and inserts into a temporary table and then another SP...
4
by: etuncer | last post by:
Hello All, I have Access 2003, and am trying to build a database for my small company. I want to be able to create a word document based on the data entered through a form. the real question is...
16
by: Mich | last post by:
Hi, i'm building an web application for anonymous users. They can take a look in the website, nothing more. In order to perform other actions, the anonymous user must be logged. So i create an...
0
by: bharathreddy | last post by:
Before going to that i want to say few thing on serialization : Serialization is the process of converting an object into a form that can be readily transported. For example, you can serialize an...
6
by: maanasa | last post by:
hi, i've one question. I'm supposed to create oracle user on click of a button using oracle forms. I'm calling a procedure which i've written in sql+ which is supposed to create the user. The...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
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...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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.