Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. VS2010 WSAT Error - Unable to connect to SQL Server database

VS2010 WSAT Error - Unable to connect to SQL Server database

Scheduled Pinned Locked Moved ASP.NET
helpasp-netdatabasesql-servercsharp
8 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    DRAYKKO
    wrote on last edited by
    #1

    Greetings All I'm experiencing some difficulty setting up Memberships using the WSAT. I get the 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've already tried running aspnet_regsql (which was successful) and I'm checking for solutions in Google, but so far nothing has helped. I've also tried changing the permissions on the MSSQL directory and checking my firewalls; not to mention using the SQL Server Configuration manager to make sure the named pipes are enabled (and restarting the service). I also tried running through the suggestion in this article: http://weblogs.asp.net/sukumarraju/archive/2010/01/17/configuring-web-application-to-utilise-asp-net-application-services-database.aspx but it only made matters worse. I'm sure there's something simple I'm overlooking. Does anyone have any suggestions about what else I might try?

    ======================= Every experience in life is a lesson to be learned A. Stevens B.S., Computer Science

    Richard DeemingR M 2 Replies Last reply
    0
    • D DRAYKKO

      Greetings All I'm experiencing some difficulty setting up Memberships using the WSAT. I get the 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've already tried running aspnet_regsql (which was successful) and I'm checking for solutions in Google, but so far nothing has helped. I've also tried changing the permissions on the MSSQL directory and checking my firewalls; not to mention using the SQL Server Configuration manager to make sure the named pipes are enabled (and restarting the service). I also tried running through the suggestion in this article: http://weblogs.asp.net/sukumarraju/archive/2010/01/17/configuring-web-application-to-utilise-asp-net-application-services-database.aspx but it only made matters worse. I'm sure there's something simple I'm overlooking. Does anyone have any suggestions about what else I might try?

      ======================= Every experience in life is a lesson to be learned A. Stevens B.S., Computer Science

      Richard DeemingR Offline
      Richard DeemingR Offline
      Richard Deeming
      wrote on last edited by
      #2

      You'll need to try to diagnose where the connection is failing:

      1. Can you connect to the server specified in your connection string using sqlcmd[^]?
      2. Can you connect using the credentials specified in your connection string?
      3. Can you access the database specified in your connection string?
      4. Can you access the database using the credentials from your connection string?

      If the answer to all of those questions is "Yes", please post the connectionStrings and system.web/roleManager sections from your web.config file. Don't forget to remove any passwords before posting!


      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

      "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

      D 2 Replies Last reply
      0
      • Richard DeemingR Richard Deeming

        You'll need to try to diagnose where the connection is failing:

        1. Can you connect to the server specified in your connection string using sqlcmd[^]?
        2. Can you connect using the credentials specified in your connection string?
        3. Can you access the database specified in your connection string?
        4. Can you access the database using the credentials from your connection string?

        If the answer to all of those questions is "Yes", please post the connectionStrings and system.web/roleManager sections from your web.config file. Don't forget to remove any passwords before posting!


        "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

        D Offline
        D Offline
        DRAYKKO
        wrote on last edited by
        #3

        Thanks Richard. The answer is yes to some of these, but I want to try one more thing. If it doesn't work I will indeed post the connectionStrings and information.

        ======================= Every experience in life is a lesson to be learned A. Stevens B.S., Computer Science

        1 Reply Last reply
        0
        • Richard DeemingR Richard Deeming

          You'll need to try to diagnose where the connection is failing:

          1. Can you connect to the server specified in your connection string using sqlcmd[^]?
          2. Can you connect using the credentials specified in your connection string?
          3. Can you access the database specified in your connection string?
          4. Can you access the database using the credentials from your connection string?

          If the answer to all of those questions is "Yes", please post the connectionStrings and system.web/roleManager sections from your web.config file. Don't forget to remove any passwords before posting!


          "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

          D Offline
          D Offline
          DRAYKKO
          wrote on last edited by
          #4

          OK. I'm fairly certain that I can connect to the database, using ADO.NET (i.e. - using SqlConnection and SqlCommand classes). I also took a look at the database I created and lo and behold under the Stored Procedure I saw all the Membership sp's that are created when using the WSAT, such as "Membership_ChangePassword" and "Membership_CreateUser". So I'm confused about why I'm seeing the error (see my original post). I'm including the connectionStrings and info as requested: The ConnectionString is:

          and the tag is:

          Does it matter that there are two entries for the name attribute even though the values are different? Any help you can offer would be greatly appreciated.

          ======================= Every experience in life is a lesson to be learned A. Stevens B.S., Computer Science

          Richard DeemingR 1 Reply Last reply
          0
          • D DRAYKKO

            OK. I'm fairly certain that I can connect to the database, using ADO.NET (i.e. - using SqlConnection and SqlCommand classes). I also took a look at the database I created and lo and behold under the Stored Procedure I saw all the Membership sp's that are created when using the WSAT, such as "Membership_ChangePassword" and "Membership_CreateUser". So I'm confused about why I'm seeing the error (see my original post). I'm including the connectionStrings and info as requested: The ConnectionString is:

            and the tag is:

            Does it matter that there are two entries for the name attribute even though the values are different? Any help you can offer would be greatly appreciated.

            ======================= Every experience in life is a lesson to be learned A. Stevens B.S., Computer Science

            Richard DeemingR Offline
            Richard DeemingR Offline
            Richard Deeming
            wrote on last edited by
            #5

            DRAYKKO wrote:

            It can also be caused by the role manager feature not being enabled.

            DRAYKKO wrote:

            <roleManager enabled="false">

            A slight clue here, perhaps? Assuming your membership stored procedures are in the StarfleetAcademyDB database, I would expect to see:

            <roleManager enabled="true" defaultProvider="AspNetSqlRoleProvider">
            <providers>
            <clear />
            <add
            name="AspNetSqlRoleProvider"
            type="System.Web.Security.SqlRoleProvider"
            connectionStringName="StarfleetAcademyDBConnectionString"
            applicationName="/"
            />
            </providers>
            </roleManager>


            "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

            "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

            D 1 Reply Last reply
            0
            • Richard DeemingR Richard Deeming

              DRAYKKO wrote:

              It can also be caused by the role manager feature not being enabled.

              DRAYKKO wrote:

              <roleManager enabled="false">

              A slight clue here, perhaps? Assuming your membership stored procedures are in the StarfleetAcademyDB database, I would expect to see:

              <roleManager enabled="true" defaultProvider="AspNetSqlRoleProvider">
              <providers>
              <clear />
              <add
              name="AspNetSqlRoleProvider"
              type="System.Web.Security.SqlRoleProvider"
              connectionStringName="StarfleetAcademyDBConnectionString"
              applicationName="/"
              />
              </providers>
              </roleManager>


              "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

              D Offline
              D Offline
              DRAYKKO777
              wrote on last edited by
              #6

              Thanks for your feedback Richard. I tried the changes you suggested, but the error persists. I also tried rebooting (just in case), but I'm still getting the error about connecting to the database. I think it also bears mentioning that I've already tried uninstalling and re-installing SQL Server 2008, as well. Andre

              1 Reply Last reply
              0
              • D DRAYKKO

                Greetings All I'm experiencing some difficulty setting up Memberships using the WSAT. I get the 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've already tried running aspnet_regsql (which was successful) and I'm checking for solutions in Google, but so far nothing has helped. I've also tried changing the permissions on the MSSQL directory and checking my firewalls; not to mention using the SQL Server Configuration manager to make sure the named pipes are enabled (and restarting the service). I also tried running through the suggestion in this article: http://weblogs.asp.net/sukumarraju/archive/2010/01/17/configuring-web-application-to-utilise-asp-net-application-services-database.aspx but it only made matters worse. I'm sure there's something simple I'm overlooking. Does anyone have any suggestions about what else I might try?

                ======================= Every experience in life is a lesson to be learned A. Stevens B.S., Computer Science

                M Offline
                M Offline
                mastanp
                wrote on last edited by
                #7

                Hi, Actually connect to the database properly means first you create the database that database name you will give in your in connection window(username, password and database name) 1. goto in visual studio. 2. server explorer 3. data connection after that right click and click add connection 4. select your server name means system name(automatically will come). 5. use sql server authentication(give ur uname and pass word must correctly) 6.select data base name. 7. test connection.

                D 1 Reply Last reply
                0
                • M mastanp

                  Hi, Actually connect to the database properly means first you create the database that database name you will give in your in connection window(username, password and database name) 1. goto in visual studio. 2. server explorer 3. data connection after that right click and click add connection 4. select your server name means system name(automatically will come). 5. use sql server authentication(give ur uname and pass word must correctly) 6.select data base name. 7. test connection.

                  D Offline
                  D Offline
                  DRAYKKO777
                  wrote on last edited by
                  #8

                  I'm using Windows authentication, but I will try it with a username and password. I am curious as to whether we can still use Windows authentication or not?

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups