MSSQL Connection String issue

Associate
Joined
14 Jan 2010
Posts
1,192
Location
Northern Ireland
I have a connection string but I keep getting an error when I try to load a page.

<add name="connString" connectionString="Data Source=10.168.1.67; Database=xxx; UserID=xxx; Password=xxxxxx"/>

I'm with TSOHost.
 
Try localhost or 127.0.0.1 instead of the 10.168.1.67. If you are connection from the server with the mssql running, you usually reference by localhost. At least in mysql and php.
 
10.168.1.67 is the internal ip for it, which you are supposed to use for an external connection, according to TSOHost.
 
Last edited:
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)
 
10.168.1.67 is a private IP address - you'll only be able to connect to that if running the code your hosting package. You'll need an external IP address for connecting remotely from your home computer.
 
I've read on the TSOHost forums that you need to use 10.168.1.67, using the external IP supposedly causes a time out, but it's worth a shot, I guess.
 
Are you connecting to the TSO database from your local machine or is the code you are running on the same server as the mssql server.
 
Back
Top Bottom