Error 26

Discussion in 'Databases' started by ginkgosys, Jan 15, 2011.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hi,

    I've wasted way too much time on this one, so could you please help me out?

    I have a SQL Server 2008 R2 database that I've created by running a script in myLittleAdmin. Everything looks fine when I query it using myLittleAdmin. However when I try to query it from my application using Linq to SQL I get this exception:

    "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 use this connection:
    <connectionStrings>
    <clear />
    <remove name="LocalSqlServer" />
    <add name="DufiConnectionString"
    connectionString="Data Source=tcp:esql2k803.discountasp.net;Initial Catalog=SQL2008R2_763135_ginkgoenergy;User ID=SQL2008R2_763135_ginkgoenergy_user;Password=*******;"
    providerName="System.Data.SqlClient" />
    </connectionStrings>

    Thanks,
    Henrik
     
  2. ...That looks valid other than the ";" after the Password.
    Besides that all I can think of is double-checking the name "DufiConnectionString".
    All the best,
    Mark
     
  3. Everything works fine on my local machine and on my local staging server, so the code should be OK. I removed the semi colon at the end of the connection string, but that didn't help.

    According to the information given in myLittleAdmin there should be no tcp before the server name in the connection string. Which is correct?

    The only explanation I can think of is som issue in the infra structure. Is there an opening for port 1434 in the firewall? Can the DNS be resolved? Are there any other sites running on the same server that use the same Db server?

    Thanks
     
  4. This is not a temporary problem. It's never worked.

    When I run my application locally but point it to the DB at DASP it works. I use exactly the same connection string (copy-paste). The only explanation I can think of is that the IIS Server cannot access the Db server and you really need to fix it ASAP.
     
  5. ...I seriously doubt there is any trouble with your DASP site accessing your DASP SQL Server.

    If you want I can create a connection on your site for you.
    This will require me to access your DASP Control Panel, which is up to you.
    (I have been doing this for DASP accounts for many years.)
    All the best,
    Mark
     
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