This topic is locked

User logon page

1/12/2006 23:05:07
ASPRunnerPro General questions
D
dcihon author

I have a database that I want users to have to provide a username and password to be able to view the database. I have set up the database to have a username field and password field that works.

This database will get updates to it and then reposted to the website.

What I want the users to be able to do is register on the site and have a password sent to them that they can change and update themselves.

What I am afraid of is if I repost the database to the website won't it overwrite any passwords that the users may have changed themselves.

Also I want to make sure only the users that are in the database are the only ones that can register. How do I do that.

Thanks

Dan

Sergey Kornilov admin 1/13/2006

Dan,
you cannot update the same database at two places at the same time. If you plan to edit data in your database you have to do this using the same web interface ASPRunenrPro builds for you.
Also there is some confusion about registration.
When new user registeres himself new data record is added into users table. What do you mean "only the users that are in the database are the only ones that can register?"

D
dcihon author 1/13/2006

In answer to your first comment. The way I want to use ASPRunner is:

I have an Access Database that we are going to be updating data in as time goes.

After it is updated we will then rebuild the website with the new data added. I don't want to modify from the website the data that is on the website.

So what is on the web page will just for the members to view and sort through to look up information from.
In answer to your second comment.

I don't want strangers to be able to get to the information.

But I want the users to control their passwords.

The way I want it to work would be for one of the members to register and then a password would be emailed to them. It could somehow verify through their email address that is stored in the database that they were allowed to even register. The once they logged in for the first time with the password that was sent to them they could change it if they wanted to.

Kind of like the way these forums do it.
I hope this helps explain it a little better.

Thanks

Dan

Sergey Kornilov admin 1/13/2006

Dan,
I see what you saying. Here is how you can do this.
As far as I understand the only table that will be updated online is Users table.
After you finished updating your local database you can go online and export all contents of Users table to CSV file. Import this file into your local database replacing old content of Users table. Upload modified database to the Web keeping users data they have changed.
Since you create usernames and passwords beforehand there is no need for users to register. They just login to the Web site using username/password you sent them and change password after that.

D
dcihon author 1/13/2006

I understand about the user table. It sounds like that will work.

However you didn't understand about the second part.
I wasn't going to create the usernames and passwords. I was going to let the members register and some way that I don't know how to do verify that they are a member by validating the email address they enter on the registration page with the email address in the database.

If it is possible to do this can you tell how i can do this.

Thanks

Dan

Sergey Kornilov admin 1/14/2006

Dan,
I see what you saying now.
You can easily implement this using BeforeRegister event in ASPRunnerPro 4.0.

I assume you have a separate table named tblValidEmails where you store emails that are allowed to self-register.
On Events tab add action Check if specific record exists to Before registration event.

Modify it the following way. Make sure you put correct table and field anmes there.

Function BeforeRegister(dict)

' Parameters:

' dict - Scripting.Dictionary object.

' Each field on this form represented as 'Field name'-'Field value' pair
'** Check if specific record exists ****

*strSQLExists = "select from tblValidEmails where EmailFieldIntblValidEmailsTable ='" & dict("EmailFieldInUsersTable") & "'"**

set rsExists = CreateObject("ADODB.Recordset")

rsExists.Open strSQLExists, dbConnection
if not rsExists.eof then

' if record exists do something

BeforeRegister = True

else

' if dont exist do something else

BeforeRegister = False

end if

rsExists.Close : set rsExists = Nothing
' set BeforeRegister to True if you like to proceed with registration

' set it to False in other case
End Function

D
dcihon author 1/14/2006

Before I try this I have version 3.2. Will this only work in 4.0?

Thanks

Dan

D
dcihon author 1/18/2006

Did you see my last post?

Sergey Kornilov admin 1/18/2006

Dan,
version 3.2 do not have Events.

D
dcihon author 1/18/2006

Did you see my last post?


If 4.0 is the only way I can acomplish what I want. How long before it comes out?

Also we just purchased 3.2 not even a month ago. Will have to pay for an upgrade?

Thanks

Dan

Sergey Kornilov admin 1/19/2006

Dan,
version 4.0 is available already - see first post in this forum.
If you haven't received your registration key contact me at support@xlinesoft.com and I'll send it to you.

D
dcihon author 1/22/2006

I am finally getting around to starting this project. In trying to see how the registration process works and change the code to test for the email address, I entered in a username and password to register which it seemed to do. I wanted to delete the registered information to start over but I don't know where it is storing the email addresses I entered. It must be someplace other that the table I told it to use because I did not see the username and password I entered in the registration process in the database table. Is there a help file that tells me how this works. Also I set it up to email me but I received to emails.

Thanks for the help

Dan

D
dcihon author 1/23/2006

Okay I want to add something to the above reply.

I am having trouble getting the registration page to work and I want to clear out all the registered users because for some reason it won't send emails. Outlook express will send email but AsPrunner won't.

The first test I want to make is that it is using my email address in the database to verify that it is a valid user.

Thanks

Dan

Sorry If I am repeating myself

Sergey Kornilov admin 1/24/2006

Dan,
new users are added to the table where you store usernames/passwords.

Register.asp automatically checks if username or email already exists and won't allow you to add duplicates.
Do you see any error messages related to email not being sent?

D
dcihon author 1/24/2006

Based on what you say. It looks like the Register.asp function is not working completely.

I don't get any error messages.

I don't see any entries put into the username and password table either.

The only thing I get is if I try to use the same email address it tells me that addtess has alreacy been used.

I would like to eraae that email address but I don't know where it is storing the information.

This is all being done on a laptop with IIS installed on it.

Let me take you through where I am at.

If I put in a username and password and email address. ( I have it asking for all three because I at some point want to validate the email address before a user can even register).

It tells me the email address is already registered. If you forgot your username or password use the password reminder form.

So I go back to the login page and select the Password reminder. I put in the email address that I just used and hit submit and it shows me a screen that says Login and password were sent to your email address. Proceed to login page. But I never get the email.

Thanks

Dan

Can I somehow start this over with everything cleared out?

D
dcihon author 1/30/2006

Any update on this for me?

Thanks

Dan

Sergey Kornilov admin 1/30/2006

As far as I understand there are two problems here:

  1. Email is not sent
    Make sure you putting correct SMTP server settings there. Make sure you can send email via any desktop mail program using the same SMTP server settings. If you use local SMTP server make sure it's installed, running and configured.
  2. You do not see usernames and passwords in login table.
    Make sure you are looking into correct database file. If you use Server.MapPath option your database file is copied to the output folder. ASP pages work with your databse copy. If you are looking into original database you won't see any new data.