Connection to SQL Server

1

I'm trying to make a connection from my local project to a SQL database that I made and uploaded to a server, the server gives me the string connection to use, but when I use the open it throws me error

 SqlConnection cn = new SqlConnection("workstation id=BDInstant.mssql.somee.com;packet size=4096;user id=XXXXXXX;pwd=XXXXXXX;data source=BDInstant.mssql.somee.com;persist security info=False;initial catalog=BDInstant");
cn.Open();

The error that appears to me is the following

  

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 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)

    
asked by Alejandro Ricotti 01.09.2016 в 22:27
source

1 answer

0

The server did not have permissions to access the database from our Local PC, in order to execute the queries we must first upload our project to your server

    
answered by 19.09.2016 / 22:11
source