Do you allow remote connections?

Discussion in 'Databases' started by mjsw, Jan 17, 2010.

  1. When I use this connection string:
    Code:
    "Data Source=[b]tcp[/b]:s01.Winhost.com;Initial Catalog=***;User ID=***;Password=***;Integrated Security=False;"
    I get this error:
    Code:
    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: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.)
    When I remove "tcp:":
    Code:
    "Data Source=s01.Winhost.com;Initial Catalog=***;User ID=***;Password=***;Integrated Security=False;"
    I'm getting:
    Code:
    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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) 
    This happens when I try to connect to my DB (located on Winhost) from external site.

    I can connect to this DB using localhost and even Windows programs, but I can't from other site, what's the problem?
     
    Last edited by a moderator: Oct 14, 2015
  2. Ray

    Ray

    Can you paste the entire code of the connection string on this thread? Just looking at what you have on this post it does not look like you are defining the provider.
     
  3. FredC

    FredC Winhost Staff

    The server / network hosting your other application most likely do not allow remote SQL connection, ie. port 1433 is not allowed.
     

Share This Page