How to sign up users for 90 days, using ASP and the internal database.
Signing up users that expire after a given time period is very easy using
the windows GUI or the remote administration module.
When you add a new user, merely specify the expiration date.
If you want to automatically schedule an email to remind the user (or yourself)
a few days before they expire, try
ocxQmail, available separately, and its
Here is how to do this automatically using an ASP script:
First create a page that collects the username and password:
<FORM METHOD="POST" ACTION="/scripts/sampleSignupProcess.asp">
<INPUT SIZE=30 NAME="username" MAXLENGTH=200>
: <font color=blue>User Name</font>
<INPUT SIZE=30 NAME="password" MAXLENGTH=200>
: <font color=blue>Password</font>
<INPUT TYPE=submit VALUE="Submit">
Then use the following ASP file to collect the data, add the user to the internal database,
and set their expiration to 90 days from now.
' Set this variable to be the AuthentiX group which is allowed
' access to the protected directory
authorizingGroup = "SampleGroup"
' Set this to be the number of days of permitted access,
' 0 for no expiration
numberOfDays = 90
' Set this to be the downloadArea
downloadArea = "http://www.yourdomain.com/members/"
' fire up AuthentiX OCX object
Set auth = Server.CreateObject("AUTHXOCX.AuthXOCXCtrl.1")
username = Request.Form("username")
if ("" = username) then
password = Request.Form("password")
addResult = auth.GroupAddNewUser(authorizingGroup, username, password, "", 0)
if (3 = addResult) Then
' user already exists, maybe user has accessed other areas and
' now wants access to this dir
addResult = auth.GroupAddUser(authorizingGroup, username)
' override the random password with the stored one
auth.UserPassword(username) = password
if (0 <> numberOfDays) Then
' Timeout users after a set period
if (auth.UserExpiration(email_address) = Empty) Then
' if not already set then set it
result = auth.UserModify(username, _
now + numberOfDays)
select case addResult
response.Write("Group does not exist.")