Setting passwordStrengthRegularExpression outside of web.config

Discussion in 'ASP .Net' started by kgray@tecolote.com, Jan 4, 2008.

  1. Guest

    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:
    <appSettings file="cfg.xml">. But, the membership provider doesn't
    have this option.

    Does anyone have any suggestions on how to achieve this?

    Thanks in advance, Kathy
     
    , Jan 4, 2008
    #1
    1. Advertising

  2. Toze Guest

    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:...
    > 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:
    > <appSettings file="cfg.xml">. But, the membership provider doesn't
    > have this option.
    >
    > Does anyone have any suggestions on how to achieve this?
    >
    > Thanks in advance, Kathy
     
    Toze, Jan 6, 2008
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hardy Wang
    Replies:
    2
    Views:
    1,479
    Joe Fallon
    Jul 31, 2004
  2. barry
    Replies:
    0
    Views:
    1,479
    barry
    Jul 1, 2006
  3. CSharpner
    Replies:
    0
    Views:
    1,035
    CSharpner
    Apr 9, 2007
  4. Brett Ossman

    passwordstrengthregularexpression Question

    Brett Ossman, Mar 2, 2009, in forum: ASP .Net Security
    Replies:
    0
    Views:
    617
    Brett Ossman
    Mar 2, 2009
  5. Krzysztof Poc

    outside type, outside function

    Krzysztof Poc, Feb 3, 2012, in forum: C++
    Replies:
    1
    Views:
    287
    Victor Bazarov
    Feb 7, 2012
Loading...

Share This Page