Setting passwordStrengthRegularExpression outside of web.config

Setting passwordStrengthRegularExpression outside of web.config

am 04.01.2008 19:18:13 von kgray

Is there anyway to set PasswordStrengthRegularExpressionon your
membership provider, without changing the web.config? I would like to
offer the user the ability to change the strength requirement for
their site, but I don't want to do it through the web.config file.
Yet, when I try membership.PasswordStrengthRegularExpression, it is
read-only.

I have found that with appsettings in the web.config, you can create a
seperate file, and set the appsettings to pull that info, ie:
. But, the membership provider doesn't
have this option.

Does anyone have any suggestions on how to achieve this?

Thanks in advance, Kathy

Re: Setting passwordStrengthRegularExpression outside of web.config

am 06.01.2008 14:48:19 von Toze

membership works with providers
so you could create a provider that inherits from the sqlMembbership
provider ( or the provider your using)

create a method in your class that change with reflection the field that
olds PasswordStrengthRegularExpression, change in the web config the the
type of the membership provider to your class
and when you need to change the PasswordStrengthRegularExpression cast the
membership provider to your class and call your method

sorry my bad english


wrote in message
news:1300cafe-95b2-4647-8eec-621ba9850315@s27g2000prg.google groups.com...
> Is there anyway to set PasswordStrengthRegularExpressionon your
> membership provider, without changing the web.config? I would like to
> offer the user the ability to change the strength requirement for
> their site, but I don't want to do it through the web.config file.
> Yet, when I try membership.PasswordStrengthRegularExpression, it is
> read-only.
>
> I have found that with appsettings in the web.config, you can create a
> seperate file, and set the appsettings to pull that info, ie:
> . But, the membership provider doesn't
> have this option.
>
> Does anyone have any suggestions on how to achieve this?
>
> Thanks in advance, Kathy