Case sensitive username/password

  • Thread starter Thread starter nemo
  • Start date Start date
N

nemo

I've included a list of username/password combinations in the
Web.Config file and I've a simple .aspx page with a username and
password field for the users to log in. While the password field is
automatically case sensitive, the username field is not. How can I
force the username field to be case sensitive, i.e. match exactly what
I have on the Web.config file? Do I have to use regular expressions?

thanks
Nemo
 
IMO you'll have to compare yourself using a case sensitive comparison in
your login page.

I'm not sure about the goal (as this is unusual it could confuse users, if
this is for additional protection I would rather enforce a particular policy
for passwords).
 
Thanks Patrice for your response. The problem I'm facing is as follows:
I don't want multiple users to log in with the same username. However
if I have "user" as the username and "pass" as the password in my
Web.Config file, the program I've written is allowing "user", "User" as
well as "USER" to log in with the same password "pass". But I want to
allow only "user".

thanks
Nemo
 
Why? do you wish to give out user, User and USER to different users as
usernames. Windows users do not expect usernames to be case sensitive, case
sensitive usernames are more of a *nix thing. What are you trying to acheive
by hacing case sensitive user names.
 
Thanks a lot. So I take it that if an user logs in as "user", closes
the browser window, and logs back as "USER", she will "see" her old
session, right? To asp both are the same, right?
 
Back
Top