ASP.net Web Site Administration tool unable to connect ro my SQL DB

Last post 06-30-2009 11:39 PM by Thomas Sun – MSFT. 2 replies.

Sort Posts:

  • ASP.net Web Site Administration tool unable to connect ro my SQL DB

    06-25-2009, 7:33 PM
    • Member
      point Member
    • Gusto001
    • Member since 06-25-2009, 4:26 PM
    • Posts 1

    Hi, I am new to VWD and i am trying to use the Provider Configuration in the ASP.net Web Site Administration tool to configure my Web site management data.

    When ever i select the "Select a single provider for all site management data" there is only one provider "AspNetSqlProvider". When i select "test" it give me the following error message:

    "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."

    I have the aspnet_regsql to create a DB, my IIS is already installed and enable but the VWD ASP.net Web Site Administration tool refuse to connect to my SQL DB.

    What may be the problem and how can i rectify it.

    Thanks

  • Re: ASP.net Web Site Administration tool unable to connect ro my SQL DB

    06-26-2009, 12:48 AM
    • Member
      348 point Member
    • albarossa
    • Member since 04-03-2008, 6:39 PM
    • Posts 68

    I'm not familiar with VWD, try this link:

    http://msdn.microsoft.com/en-us/library/s4yys16a(VS.80).aspx

  • Re: ASP.net Web Site Administration tool unable to connect ro my SQL DB

    06-30-2009, 11:39 PM
    Answer

     Hi,

    By default, ASP.NET Web Site Administration tool uses connection string named "LocalSqlServer" to connect database. It is "data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" by default.

    In your case, you created your own database using aspnet_regsql. Please make sure this connection string is correct. You can configure it in your web.config.

    <connectionStrings>

    <remove name="LocalSqlServer" />

    <add name="LocalSqlServer" connectionString="your connection string" providerName="System.Data.SqlClient" />

    </connectionStrings>

    I look forward to receiving your test results.

    Thomas Sun
    Microsoft Online Community Support

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question.
Page 1 of 1 (3 items)