YAFLogo

phaedoHD
  • phaedoHD
  • 68% (Friendly)
  • YAF Forumling Topic Starter
14 years ago
Hi,

I'd like to change the password requirements on the yaf registration page. My old registration page only required 4 letters or longer thorugh the machine.config membership settings.

With yaf now though it wants a special characters "!?@ etc" and a different case in the letters.

So i then added this to the web.config membership section:

minRequiredPasswordLength="4"

minRequiredNonalphanumericCharacters="0"

like this:

name="CustomizedMembershipProvider" type="System.Web.Security.SqlMembershipProvider"

minRequiredPasswordLength="4"

minRequiredNonalphanumericCharacters="0"

/>

But that just gives me an error.

Any idea how to change this to what i want here? Thanks!

Sponsor

test2005
14 years ago
In order for those settings to work, your "CustomizedMembershipProvider" must extend them from the framework.

If you use the ASP.NET default membership and roles provider, you should have no problem.


.....the man in black fled across the desert..........and the gunslinger followed.....

phaedoHD
  • phaedoHD
  • 68% (Friendly)
  • YAF Forumling Topic Starter
14 years ago
test2005 wrote:

If you use the ASP.NET default membership and roles provider, you should have no problem.

I'm using the default membership provider with yaf. Here is my web.config.

Any ideas what is going wrong here? Thanks!

name="CustomizedMembershipProvider" type="System.Web.Security.SqlMembershipProvider"

/>

connectionStringName="LocalSqlServer"

applicationName="/"

type="System.Web.Profile.SqlProfileProvider" />

name="CustomizedRoleProvider" type="System.Web.Security.SqlRoleProvider" />

timeout="14400000" />

type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">

type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">

phaedoHD
  • phaedoHD
  • 68% (Friendly)
  • YAF Forumling Topic Starter
14 years ago
ah, never mind it is working now. i must have had a typo or something when i first did it. my bad.
test2005
14 years ago
What version are you running?

If it's v1.9.3.3 the providers sections should look like this...


<roleManager enabled="true" defaultProvider="YafRoleProvider">
    <providers>
        <clear/>
        <add connectionStringName="yafnet" 
             applicationName="YetAnotherForum" 
             name="YafRoleProvider" 
             type="YAF.Providers.Roles.YafRoleProvider"/>
    </providers>
</roleManager>

<membership defaultProvider="YafMembershipProvider" hashAlgorithmType="SHA1">
         <providers>
             <clear/>
             <add connectionStringName="yafnet" 
                  applicationName="YetAnotherForum" 
                  name="YafMembershipProvider" 
                  requiresUniqueEmail="true" 
                  useSalt="true" 
                  type="YAF.Providers.Membership.YafMembershipProvider"/>
          </providers>
</membership>

<profile enabled="true" defaultProvider="YafProfileProvider" inherits="YAF.Classes.Utils.YafUserProfile">
    <providers>
        <clear/>
        <add connectionStringName="yafnet" 
             applicationName="YetAnotherForum" 
             name="YafProfileProvider" 
             type="YAF.Providers.Profile.YafProfileProvider"/>
    </providers>
</profile>

But if your wanting to do what you discussed above, the section should look like this...


<membership>
    <providers>
        <clear/>
        <add name="AspNetSqlMembershipProvider" 
             type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
             connectionStringName="yafnet" 
             enablePasswordRetrieval="false" 
             enablePasswordReset="true" 
             requiresQuestionAndAnswer="true" 
             applicationName="YetAnotherForum" 
             requiresUniqueEmail="false" 
             minRequiredPasswordLength="5" 
             minRequiredNonalphanumericCharacters="0" 
             passwordFormat="Hashed" 
             maxInvalidPasswordAttempts="5" 
             passwordAttemptWindow="10" 
             passwordStrengthRegularExpression=""/>
    </providers>
</membership>
		
<roleManager enabled="true">
    <providers>
        <clear/>
        <add connectionStringName="yafnet" 
             applicationName="YetAnotherForum" 
             name="AspNetSqlRoleProvider" 
             type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
    </providers>
</roleManager>

<profile enabled="true" defaultProvider="YafProfileProvider" inherits="YAF.Classes.Utils.YafUserProfile">
    <providers>
        <clear/>
        <add connectionStringName="yafnet" 
             applicationName="YetAnotherForum" 
             name="YafProfileProvider" 
             type="YAF.Providers.Profile.YafProfileProvider"/>
    </providers>
</profile>

REMEMBER.....each of these settings need the ConnectionString and ApplicationName set CORRECTLY in order to work!!!

Missing out one will cause an error!

HTH

:)


.....the man in black fled across the desert..........and the gunslinger followed.....