Understanding defaultProvider for Membership and RoleManager?

I find different 'defaultProvider' used and don't know which one to use.

It seems that 'AspNetSqlProvider' is the standard, but I find others used.

Also, 'name=' and 'applicationName' are diffent from app to app, don't understand why?

Does the aspnet_Applications ApplicationName column need to match?

Here's my web.config

<system.web>       
               <authentication mode="Forms">
                          <forms name=".ASPXAUTH"
                                     loginUrl="login.aspx"
                                     defaultUrl="default.aspx"
                                     protection="All"
                                     timeout="30"
                                     path="/"
                           requireSSL="false"
                    slidingExpiration="true"                   
                    cookieless="UseCookies"
                    enableCrossAppRedirects="false"/>
            </authentication>       
                    <membership defaultProvider="AspNetSqlProvider" userIsOnlineTimeWindow="15">
            <providers>
                <add
                    name="AspNetSqlProvider"
                    type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
                    connectionStringName="AspSqlConn"
                    enablePasswordRetrieval="true"
                    enablePasswordReset="true"
                    requiresQuestionAndAnswer="false"
                    applicationName="AspNetSqlProvider"
                    requiresUniqueEmail="true"
                    passwordFormat="Clear"/>
            </providers>
        </membership>
       
        <roleManager
                    enabled="true"
                    cacheRolesInCookie="true"
                    defaultProvider="AspNetSqlRoleProvider"
                    cookieName=".ASPXROLES"
                    cookiePath="/"
                    cookieTimeout="30"
                    cookieRequireSSL="false"
                    cookieSlidingExpiration="true"
                    createPersistentCookie="false"
                    cookieProtection="All">            
        </roleManager>
</system.web>


Help
LVL 1
kvnsdrAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ted BouskillSenior Software DeveloperCommented:
Application name in the connection string is optional but is great for debugging purposes on the SQL server side.  You can actually monitor SQL connections using it.

The name='' attribute is so that you can use multiple SQL providers with one being the default.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kvnsdrAuthor Commented:
So, as is, my current web.config is usable?

How would you improve it?
0
Ted BouskillSenior Software DeveloperCommented:
Yep your current file is fine.  I'd change one line: applicationName="AspNetSqlProvider"

Instead of a generic name use the name of your actual application.  It's easier to spot when debugging SQL using the Profiler.

If your application name is "My Cool Application" use applicationName="My Cool Application"
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.