connection string, ip, remote server connection
-
Hello, I am trying to connect to a sql server 2005. Under the surface server configuration - remote connections i have set it for named pipes and tcp/ip. Is there something else i should do with the configuration? I have also turned of the firewall, in case that has caused a problem. my connection string is below.
Try cnn.ConnectionString = "data source=1.1.1.1,1433\ssd01;Network Library=DBMSSOCN;database=serviceAcc; user id=; pwd=;persist security info=True; encrypt=yes" Catch ex As Exception Console.WriteLine(ex.Message) End Try
I have changed this a few time and the error message: "An 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: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.)" Thanks in advance, Steve -
Hello, I am trying to connect to a sql server 2005. Under the surface server configuration - remote connections i have set it for named pipes and tcp/ip. Is there something else i should do with the configuration? I have also turned of the firewall, in case that has caused a problem. my connection string is below.
Try cnn.ConnectionString = "data source=1.1.1.1,1433\ssd01;Network Library=DBMSSOCN;database=serviceAcc; user id=; pwd=;persist security info=True; encrypt=yes" Catch ex As Exception Console.WriteLine(ex.Message) End Try
I have changed this a few time and the error message: "An 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: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.)" Thanks in advance, SteveHi, It seems that you are using named instance. In such a case you should check what is the port of that named instance in order to point your connection string correctly. For example, if your port number is 1550 you should specify the connection string as follows:
Network Library=dbmssocn;Data Source=127.0.0.1,1550;...
Hope it helps,Uri