Membership provider part 7 error

Jul 25, 2011 at 1:58 PM

Hello,

I have tried the membership provider and I keep getting this error:

There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store.

The following message may help in diagnosing the problem: Unable to connect to SQL Server database.

 

this is my web.config

<connectionStrings> <add name="MusicStoreEntities" connectionString="Data Source=|DataDirectory|MvcMusicStore.sdf" providerName="System.Data.SqlServerCe.4.0"/>
 <add name="MembershipSQLProvider" connectionString="data source=MYComputer-MAINPC\SQLEXPRESS;
 Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true"
 providerName="System.Data.SqlClient" /> 
</connectionStrings>
 <system.web>
 <roleManager enabled="true"> 
<providers>
 <clear/> 
<add name="AspNetSqlRoleProvider" connectionStringName="MembershipSQLProvider" 
applicationName="/" type="System.Web.Security.SqlRoleProvider" /> 
</providers>
 </roleManager>
 <membership>
 <providers>
 <clear/> 
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" 
connectionStringName="MembershipSQLProvider" 
enablePasswordRetrieval="false" enablePasswordReset="true"
 requiresQuestionAndAnswer="false" 
requiresUniqueEmail="false" 
maxInvalidPasswordAttempts="5"
 minRequiredPasswordLength="6"
 minRequiredNonalphanumericCharacters="0"
 passwordAttemptWindow="10" applicationName="/" />
 </providers>
 </membership>
The:
"connectionString="data source=MYComputer-MAINPC\SQLEXPRESS;"

Is similar to my local server name as I'm using in my "sql studio management "

any idea what i did wrong?

thanks