0

We used the aspnet_regsql.exe tool to add membership tables to our existing database and added the following LocalSqlServer lines into our Web.config file:

<clear/>

<add name="Dorknozzle"
     connectionString="Server=OUR-PC;Database=Dorknozzle;Integrated Security=True"
     providerName="System.Data.SqlClient" />

<add name="LocalSqlServer"
    connectionString="Server=OUR-PC;Database=Dorknozzle;Integrated Security=True"
    providerName="System.Data.SqlClient" />

When we click on the Security tab of the Web Site Administration Tool we get the following error:

There is a problem with your selected data store.

The server and database names are correct because the web forms do display data from the Dorknozzle database and I made sure that the membership tables are residing in the Dorknozzle database.

We also clicked on the Provider tab but could only see AspNetSqlProvider when we were expecting to also see Dorknozzle.

Can you tell me what we are missing to get the Web Site Administration Tool to connect to the data store in dorknozzle?

Update: Thanks go to Jon for guiding us with this issue. I added the following codeing in the system.web section of our Web.config file and we can now see the information in the Security tab of the Web Site Administration Tool:

<membership>
  <providers>
    <clear />
    <add name="AspNetSqlMembershipProvider" 
         type="System.Web.Security.SqlMembershipProvider"
         connectionStringName="Dorknozzle" 
         enablePasswordRetrieval="false" 
         enablePasswordReset="true"
         requiresQuestionAndAnswer="false" 
         requiresUniqueEmail="false" 
         maxInvalidPasswordAttempts="5"
         minRequiredPasswordLength="6" 
         minRequiredNonalphanumericCharacters="0" 
         passwordAttemptWindow="10" 
         applicationName="/" />
  </providers>
</membership>
Emad-ud-deen
  • 4,734
  • 21
  • 87
  • 152
  • On a related note, why not change the cn string name for the membership provider in web.config so that you only need one cn string definition. ie change `connectionStringName` under `membership>providers` to `Dorknozzle` (may need to change others too) – Jon Egerton Sep 05 '12 at 10:14
  • Thanks for the reply Jon. Can you give more details on how to change connectionStringName under membership>providers? We don't see any tab in the Web Site Administration Tool to select membership>providers. We could only find "Select a single provider for all site management data" in the "Provider" tab. clicking that link only shows a screen that displays AspNetSqlProvider and no other choice to indicate what that provider actually is. – Emad-ud-deen Sep 05 '12 at 10:35
  • Thanks Jon. I figured out what you were referring to. I changed the Web.config file to include the additional membership section. I updated the post to show what I added. – Emad-ud-deen Sep 05 '12 at 10:55

0 Answers0