A network-related or instance-specific error problem

Discussion in 'Databases' started by projectft, Mar 2, 2010.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hello everyone. I just begin to use this host shortly, and I need help right now. The problem is I used Visual Studio to deploy the website into hosting, but the database does not work and it show me this error:
    Code:
    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)
    I look up some post in this forum, all pointed to the connection string so I post my here:
    Code:
    <clear />
    <remove name="LocalSqlServer"/>
    <add name="LocalSqlServer" connectionString="Data Source=tcp:sql2k803.discountasp.net;Initial Catalog=SQL2008_[number]_[name];User Id=SQL2008_[number]_[name]_user;Password=*;" providerName="System.Data.SqlClient"/>
    <remove name="ConnectionString"/>
    <add name="ConnectionString" connectionString="Data Source=tcp:sql2k803.discountasp.net;Initial Catalog=SQL2008_[number]_[name];User Id=SQL2008_[number]_[name]_user;Password=*;" providerName="System.Data.SqlClient"/>
    So what wrong? Running on local very good, running on my own server well too, but when I deploy into host, it cannot access the database even though I use the tool that attach the SQL Express database into the SQL Server database.
     
  2. dmitri

    dmitri DiscountASP.NET Staff

    Please remove providerName="System.Data.SqlClient" from your connection sting on the server and make sure you enter the correct password.
     
  3. Curious...Why remove that? I always use it in my conn strings.
    From what I can see the only problem in his conn string above is the semicolon after PW.
    If he takes that out it should work.
    All the best,
    Mark
     
  4. Me too

    Hi,

    Just a note to say I get this too, though intermittently - most of the time the connection is fine.
    I also get timeout errors.
    See post http://community.discountasp.net/showthread.php?t=9728

    Just wondering if you a) suffer(ed) the problem intermittenly and b) got it fixed !

    For what it's worth - I've never specified the sqlclient provider in my connection string.

    Cheers
     
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