Bilal Malik

Bilal Malik

  • NA
  • 95
  • 882

Unabe to connect <Rolemanager> with SQL Server in asp.net

Feb 14 2015 12:10 PM


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.

Here is membership config:

<membership defaultProvider="StudentSqlMembershipProvider">
<providers>
<add connectionStringName="StudentConnectionString" enablePasswordRetrieval="false"
enablePasswordReset="true" requiresQuestionAndAnswer="true"
applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed"
maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7"
minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10"
passwordStrengthRegularExpression="" name="StudentSqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
</membership>
 
 Here is and roleManager config:
 
<roleManager enabled="true" defaultProvider="StudentSqlRoleProvider">
<providers>
<clear />
<add connectionStringName="StudentConnectionString" applicationName="/"
name="StudentSqlRoleProvider" type="System.Web.Security.SqlRoleProvider, System.Web, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
</roleManager>
 
Here is connection string code
<connectionStrings>
<add name="StudentConnectionString" connectionString="Data Source=babar;Initial Catalog=Student;Integrated Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>