Error 26 message

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Newbie19
    New Member
    • Jun 2007
    • 122

    Error 26 message

    I'm creating an API that is going to pull data from a sql db, but I get this error message,

    error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
    at System.Data.Sql Client.SqlInter nalConnection.O nError(SqlExcep tion exception, Boolean breakConnection )

    I using the following to connect to the db:

    n error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
    at System.Data.Sql Client.SqlInter nalConnection.O nError(SqlExcep tion exception, Boolean breakConnection )

    Thanks,
  • azimmer
    Recognized Expert New Member
    • Jul 2007
    • 200

    #2
    Originally posted by Newbie19
    I'm creating an API that is going to pull data from a sql db, but I get this error message,

    error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
    at System.Data.Sql Client.SqlInter nalConnection.O nError(SqlExcep tion exception, Boolean breakConnection )

    I using the following to connect to the db:

    n error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
    at System.Data.Sql Client.SqlInter nalConnection.O nError(SqlExcep tion exception, Boolean breakConnection )

    Thanks,
    Though the second part of your post isn't any new :-), I suggest you read the first match (out if the currently 929) google brings up on "SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified" search phrase.

    It says:
    Here are the steps:
    1) Make sure your server name is correct, e.g., no typo on the name.
    2) Make sure your instance name is correct and there is actually such an instance on your target machine.
    3) Make sure the server machine is reachable, e.g, DNS can be resolve correctly, you are able to ping the server (not always true).
    4) Make sure SQL Browser service is running on the server.
    5) If firewall is enabled on the server, you need to put sqlbrowser.exe and/or UDP port 1434 into exception.


    I say: please, search before you ask. Hope it helps.

    Comment

    Working...