I am 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 connection string to use, but when I use open it throws me an 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 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)
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