Problem uploading a one page site with a database.

Discussion in 'Getting started' started by ExpressShipping, Sep 6, 2011.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Ordered Add On. SQL 2008 database.
    then created new website using vs 2010 ultimate and ado.net 3.5

    Then created a new table "customers" and page "default.aspx, added a gridview and set the sqldatasource to customers table.

    Right clicked my database "database.mdf" in server explorer and used "Publish to Provider".

    Using "Copy Website" ftp to upload the one page site.

    When I enter my url to view it I get the error,
    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

    How do get this one page test to upload?
     
  2. I tried the attach tool in control panel without success.

    Database Management - SQL Tool Suite then

    /App_Data/customers.mdf
     
  3. My database is SQL Express I believe. Is that the problem?

    <connectionStrings>
    <add name="ConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True"
    providerName="System.Data.SqlClient" />
    </connectionStrings>
     
  4. Bruce

    Bruce DiscountASP.NET Staff

    You need to change the connection string.

    You should be able to find the connection string in the MSSQL manager in the control panel.
     
  5. Changer to connection string as in Control Panel, still get error.

    <connectionStrings>
    <add name="CustomersConnectionString" connectionString="Data Source=tcp:sql2k803.discountasp.net;Initial Catalog=SQL2008_757078_mydatabase;User ID=SQL2008_757078_mydatabase_user;Password=mypassword;"
    providerName="System.Data.SqlClient" />
    </connectionStrings>

    I also get error when uploading database from control panel.

    Failed. Your database has been rolled back. Please contact Technical Support for details.
     
  6. RayH

    RayH DiscountASP.NET Lackey DiscountASP.NET Staff

    Please open up a support ticket so that we can provide you with more information regarding the failed database restore.
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page