Cannot restore or connect to database

Discussion in 'Databases' started by dusseldorf, Oct 14, 2015.

  1. I have an asp.net project with entity framework that I trying to publish to winhost. I have two problems.

    1. I cannot restore the database from my backup of the local database

    I read your instructions from the link below. But when I do back up restore. I get an error. It says "Restore failed. Please contact support for details."

    https://support.winhost.com/kb/a104...a-winhost-sql-database.aspx?KBSearchID=582209

    2. I have trouble connecting the site to the MS SQL database.


    I used the connection string from winhost. When I run the project through Visual studio and winhost connection string I am able to connect to the database and my site works fine. But when I publish the project the live site is unable to connect to the sql database. I get the error pasted below.

    "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: 52 - Unable to locate a Local Database Runtime installation. Verify that SQL Server Express is properly installed and that the Local Database Runtime feature is enabled."

    I have attached the web.config file for your reference. It doesn't include the password but it has all the other settings (including the local connection string and the winhost connection string).

    Can someone please help?
     

    Attached Files:

  2. I was able to fix the #1. My sql database was not the same version as my local sql. I deleted the db and got a 2014 sql db and I was able to successfully restore. But I continue to hit #2. My server has moved to s11.winhost.com now.
     
  3. Elshadriel

    Elshadriel Winhost Staff

    Make sure the connection string is using s11.winhost.com then and make sure you are entering the password. Also, the error message seems to indicate your application is still trying to connect to a SQL Express database. Find out why, and you'll solve the problem.
     

Share This Page