Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. connection string, ip, remote server connection

connection string, ip, remote server connection

Scheduled Pinned Locked Moved Database
databasesysadminhelpsql-serversecurity
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    steve_rm
    wrote on last edited by
    #1

    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

    U 1 Reply Last reply
    0
    • S steve_rm

      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

      U Offline
      U Offline
      Uri Lavi
      wrote on last edited by
      #2

      Hi, 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

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups