Web Site Administration Tool -- problem with your selected data store

Last post 05-17-2009 3:56 AM by hitinderb4u. 4 replies.

Sort Posts:

  • Web Site Administration Tool -- problem with your selected data store

    05-11-2009, 12:15 PM
    • Member
      84 point Member
    • hitinderb4u
    • Member since 08-13-2007, 10:46 AM
    • Bahrain
    • Posts 51

    After Asp.Net Web site configuration tools for VS 2005 gets launched. When clicked on security ... it shows following 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.

     I tried changing the Data Source name to the machine name in ASP.NET tab in IIS default web server.

     However i recently upgraded to MS SQL SERVER 2005 Standard edition from SQLEXPRESS.

     And then repaired .NET Framework 2.0 installation.

     

    Any help will be appreciated!!

    Thank you!!

    -- 

    Hitin

    Hitinder Bawani

    MCTS - WEB
    ASP.NET
  • Re: Web Site Administration Tool -- problem with your selected data store

    05-14-2009, 11:07 AM
    • Member
      84 point Member
    • hitinderb4u
    • Member since 08-13-2007, 10:46 AM
    • Bahrain
    • Posts 51

    24 views and not even a single reply!! Well the problem is still not fixed.

    However I have tried following steps.

    Removed .net Framework 3.5 and 3.0.
    Repaired .NET framework 2.0
    Reinstalled visual studio 2005.
    Dropped aspnetdb from server.
    Used aspnet_regsql -E -S -A all to recreate aspnetdb
    Still cannot use Website configuration tool to configure website for Roles and Membership.
    ------Web.config settings -----

    <connectionStrings>
        <remove name="LocalSqlServer" />
        <add name="LocalSqlServer" connectionString="Data Source=H;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" />
        <add name="devConStr" connectionString="Data Source=H;Integrated Security=True; Initial Catalog=Development;" providerName="System.Data.SqlClient" />
      </connectionStrings>
    ------------------------------------------

    P.S. My machine name is H and SQL SERVER 2005 has the same name H. Is that a problem?!!

    Hitinder Bawani

    MCTS - WEB
    ASP.NET
  • Re: Web Site Administration Tool -- problem with your selected data store

    05-14-2009, 7:11 PM
    • All-Star
      17,440 point All-Star
    • guru_sarkar
    • Member since 08-31-2007, 12:00 AM
    • Posts 2,645

    Drop the aspnetDB once again and try this:

    http://weblogs.asp.net/scottgu/archive/2005/08/25/423703.aspx

    Try:Drop a sqlDatasource on any aspx page and configuring it to connect to aspnetDB....look at the connectionString that it gives you. Use that connectionstring.

  • Re: Web Site Administration Tool -- problem with your selected data store

    05-15-2009, 3:41 AM

    Hi,hitinderb4u

    How about configuring membership provider manually:in website's web.config file like this:

    <system.web>

           <membership defaultProvider="SecurityTutorialsSqlMembershipProvider">
            <providers>
              <!--Add a customized SqlMembershipProvider -->
              <add name="SecurityTutorialsSqlMembershipProvider"
                   type="System.Web.Security.SqlMembershipProvider"
                   connectionStringName="LocalSqlServer"
                   enablePasswordRetrieval="false"
                   enablePasswordReset="true"
                   requiresQuestionAndAnswer="true"
                   applicationName="SecurityTutorials"
                   requiresUniqueEmail="true"
                   passwordFormat="Hashed"
                   maxInvalidPasswordAttempts="5"
                   minRequiredPasswordLength="7"
                   minRequiredNonalphanumericCharacters="1"
                   passwordAttemptWindow="10"
                   passwordStrengthRegularExpression="" />
            </providers>
          </membership>

    </system.web>

    Regards

     

     

     

    Andrew Zhu
    Microsoft online ASP.NET support
    Please remember to click “Mark as Answer” on the post that helps you. This can be beneficial to other community members reading the thread.
  • Re: Web Site Administration Tool -- problem with your selected data store

    05-17-2009, 3:56 AM
    Answer
    • Member
      84 point Member
    • hitinderb4u
    • Member since 08-13-2007, 10:46 AM
    • Bahrain
    • Posts 51

    Thank you Guru and Andrew!!

    However this is not what I was looking for. I wanted to know how one can solve that problem. And now I have figured out the problem.

    Well this is not a Problem. But this is actually a option available only in SQL Express 2005. SQL Express support user instance login and it allow to create defaul aspnetdb and uses same for all teh applications.

    If working on other version of SQL Server we need to create a unique database for each application.

    start aspnet_regsql from visual studio command prompt. Then select the server and then type the database name for your application.(you can not have more then one aspnetdb, so use a different name) Every website will hoste its membership and roles data on seperate DB on the server.

    Then in the Web config file add a connection string using the database created.

    Thats it no need to change anything in IIS or global configuration file.

    Hitinder Bawani

    MCTS - WEB
    ASP.NET
Page 1 of 1 (5 items)