views:

29

answers:

2

Hello..

ASP.NET 4.0 and C#

I'm using the default membership provider with the SqlExpress DB that the ASP.NET had created for me, but I want to modify some settings.

so I went to the web.config file to search for the and to change setting there, but I didn't find them!

I don't want to create a new provider. I just want to modify the existing one.

Why I don't find them?!

+2  A: 

Because it's the default using default values.

Below is an example. put it after <system.web>

<membership>
        <providers>
            <clear/>
            <add name="AspNetSqlMembershipProvider"
                connectionStringName="LocalSqlServer"
                enablePasswordRetrieval="false"
                enablePasswordReset="true"
                requiresQuestionAndAnswer="true"
                applicationName="/"
                requiresUniqueEmail="false"
                passwordFormat="Hashed"
                maxInvalidPasswordAttempts="5"
                minRequiredPasswordLength="7"
                minRequiredNonalphanumericCharacters="1"
                passwordAttemptWindow="10"
                passwordStrengthRegularExpression=""                     
                type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
        </providers>
    </membership>
Jeroen
Thanks bro.but a small question: are these the default values of the default provider the ASP.NET use?
Hashem Alrifai
No. I don't think so. If you want the default values you can remove the complete section :) ... or just a field. Check machine.config for default values.
Jeroen
A: 

The default membership provider is configured in your machine.config. Either modify the settings in the web.config, or copy the settings from your machine.config to your web.config to customize it. You may need to add a <remove> element in the web config before re-adding it.

kbrimington
aha, so that's the concept..I thank you man :)
Hashem Alrifai