Unable to Create Data Connection in Visual Studio RRS feed

  • Question

  • I'm trying to create a new data connection in Visual Studio (so that I can create an entity model for EF) and I get the following error message:

    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)

    The server name and instance are correct as is my SQL Server authentication information (due to the use of different domains, Windows authentication is not possible). I can connect to the database instance on the same client machine using SQL Server Management Studio. The machine I'm having troubles with is running Windows 7 64-bit. I have another machine running Windows XP 32-bit and there are no problems creating the connection.

    Also, I did read somewhere about how sometimes you need to specify the transport protocal (i.e. tcp:ServerName/InstanceName) but that also does not resolve the problem.

    Thursday, July 8, 2010 12:29 PM

All replies

  • I don't see what your connection string looks like, but you may want to check the below forum post to see if it's of any help:


    Paul ~~~~ Microsoft MVP (Visual Basic)
    Thursday, July 8, 2010 2:00 PM
  • I have seen that forum post and it didn't seem to help.  Below is the connection string (modified to take out security items): 

    Data Source=ServerName\InstanceName;Initial Catalog=ITASS;Persist Security Info=True;User ID=userid

    I have also tried using the IP Address instead of the server name, with the same result.

    Thursday, July 8, 2010 2:44 PM
  • Was the omission of the Password argument in your connection string intentional?

    You may also want to try a different syntax since an instance name is being referenced:


    Paul ~~~~ Microsoft MVP (Visual Basic)
    Thursday, July 8, 2010 3:20 PM
  • I have narrowed down the problem to Windows Firewall, but have not come to the final solution.  I can turn off the firewall on the private network and Visual Studio is able to connect, turn it back on it Visual Studio was not able to connect to the database.  I tried enabling ports 1433 and 1434 with no success.

    For now I'm going to simply keep the firewall off, but I'm hoping to find a better, safer solution.

    Tuesday, July 13, 2010 8:42 PM