Forum Moderators: mack

Message Too Old, No Replies

Generating a random number for user name and password

         

asplearner2003

8:25 am on May 29, 2003 (gmt 0)

10+ Year Member



Hello all.

I am developing an asp site where I need to generate a unique number with alphabetic characters as user name (eg. M123412001 when other person registering his user name should be M123412002 and next M123412003 etc...) and password (with or without numbers) when one new user is registering the site and this user name and password have to send him to his email address automatically when all these process got over.

I just want to know how to do this using asp with access db?

SinclairUser

9:25 am on May 29, 2003 (gmt 0)

10+ Year Member



Hi - I dont have a solution to your problem but do have a suggestion. I use perl to generate userids and passwords. I try to use avoid generating zeros and ones in case they are mistaken for the letter O or letter l. It can be a real pain to answer lots of emails saying their password does not work.

BlobFisk

10:12 am on May 29, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld, asplearner2003!

You should check out the ASP Forum [webmasterworld.com] here for all things ASP!

If you do a search for "asp random password generation" you will get some nice pointers and even some code snippets to do this for you.

bonanza

10:15 am on May 29, 2003 (gmt 0)



SinclairUser's advice is very good.

I might go so far as to not include ones and zeros OR o's and l's in the password. Save yourself some "I can't log in" hassles.

dmorison

10:22 am on May 29, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Your last thread on this same subject seemed to get lost in the post... Here's my reply adding to the point about not using confusable characters..


Hi,
An ASP guru will probably be along in a moment to help you out...

However, when you've found out what to do, I would recommend limiting the letters you use to those in the string:

"ABCEFHJKMNPRTWXY"

It should be easy to create a visual basic function that will select one or more random letters from that string.

The reason is that all those letters can be easily distinguished from numbers in virtually any font, and in either upper or lower case.

If you go around creating usernames with letters like "I" in them, half your users will think it's a "1".

Good luck!