Regular Expression Use in Password Recovery Control

E

EagleRed

I have an ASP.NET 2.0 application that is using Forms Authentication and the
SQL Server 2005 membership provider. I am using the password recovery
control to allow users to recover passwords. (The passwords are stored in
hashed form.) I noticed that the passwords that are generated do not fit the
regular expression that is supplied in the web.config file. They can be too
long and can contain disallowed characters. For example, the max. length in
my regular expression validator is 12 characters and the password returned
contained 14 characters.

As a consequence when the password is used in subsequent operations the
regular expression validators reject it. (Not pretty for my users.)

What is happening here? What are some reasonable remedies? The password is
already set in the aspnet_Membership table the uses can be stuck? I have
checked the documentation on the Membership.GeneratePassword method and I see
I need to change the regular expression to accept the characters in that
method. The only thing that is not specified is the maximum length of the
password this method generates. What is that value?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,019
Latest member
RoxannaSta

Latest Threads

Top