3
votes

Using the website administation tool, it always give error for database.

<membership>
  <providers>
    <remove name="AspNetSqlMembershipProvider"/>
    <add name="FTESqlMembershipProvider"
         type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" 
         connectionStringName="FTEDashBoard.ConnectionString" 
         enablePasswordRetrieval="false" 
         enablePasswordReset="true" 
         requiresQuestionAndAnswer="true" 
         applicationName="/" requiresUniqueEmail="false" 
         passwordFormat="Hashed" maxInvalidPasswordAttempts="5" 
         minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1" 
         passwordAttemptWindow="10" passwordStrengthRegularExpression=""/>
  </providers>          
</membership>

<roleManager>
  <providers>
    <remove name="AspNetSqlRoleProvider"/>
      <add name="FTESqlRoleProvider" connectionStringName="FTEDashBoard.ConnectionString" 
           applicationName="/" 
           type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>          
  </providers>
</roleManager>

It is giving me 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: Object reference not set to an instance of an object. and when i want to choose datatsource is giving me The following message may help in diagnosing the problem: Object reference not set to an instance of an object. at ASP.providers_chooseprovidermanagement_aspx.Page_Load() in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ASP.NETWebAdminFiles\Providers\chooseProviderManagement.aspx:line 13 at System.Web.Util.CalliHelper.ArglessFunctionCaller(IntPtr fp, Object o) at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint

iam really not usre why in tool it is not able to acess database.. my connectionstring in web.config is

<connectionStrings>
  <add name="FTEDashBoard.ConnectionString" connectionString="Data Source=logsuatsql01;Initial Catalog=CMNBS;Persist Security Info=True;User ID=FTEDashboard;Password=dashbrdFte!@#;Max Pool Size=500;AttachDBFilename=|DataDirectory|aspnetdb.mdf;Connect Timeout=600"/>       
</connectionStrings>
3
when iam selecting it is giving Provider Management Could not establish a connection to the database. If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider.deepti
Does the database exist? Do you have access to it? Does the user context under which the site is running have access to it?David
hi David .. yes database exist .. ans all aspnet_userrs table exists in different database so i changes my conenction string <add name="Application.ConnectionString" connectionString="Data Source=logsuatsql01;Initial Catalog=ApplicationConfiguration;Persist Security Info=True;User ID=FTEDashboard;Password=dashbrdFte!@#;Max Pool Size=500;AttachDBFilename=|DataDirectory|aspnetdb.mdf;Connect Timeout=600"/>deepti
What file is that at the top that has "rolemanager" in it?obesechicken13

3 Answers

6
votes

I ran into this problem as well. I figured out that all I had to do was rebuild my solution.

Hope that helps!

3
votes

As mentioned in the error you might want to enable roleManager like:

<roleManager enabled="true">

Edit 1:

Flaw in your connection string. Remove this: AttachDBFilename=|DataDirectory|aspnetdb.mdf; And you have your aspnet membership tables in your said DB - CMNBS right?

2
votes

This issue is mostly generated when the solution is cleaned! So try to Rebuild entire solution and that will solve the problem.