views:

600

answers:

1

"apparently it works"

Can you name reasons beyond good practices not to give these two:

connectionStringName and Membership Provider name the same string value?

could this be an issue?

as in:

  <membership defaultProvider="MySqlConnection" userIsOnlineTimeWindow="45">
         <providers>
            <clear />
            <add name="MySqlConnection" 
            type="System.Web.Security.SqlMembershipProvider"
            connectionStringName="MySqlConnection"

            applicationName="HQChannel" 
            enablePasswordRetrieval="true" 
            enablePasswordReset="true"
            requiresQuestionAndAnswer="false" 
            requiresUniqueEmail="true" 
            passwordFormat="Hashed" 
            minRequiredNonalphanumericCharacters="0"

            minRequiredPasswordLength="6" />
         </providers>
    </membership>

as per this post

Thanks

+1  A: 

I wouldn't name it the same as the connection string for the following reasons:

  • I name connection strings with namespace prefixes, so you know which assembly they are related to (eg: MyApp.Web.MySqlConnection)
  • MySqlConnection doesn't imply a MembershipProvider
  • It can introduce confusion
Slace