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.
This error means, the server you are trying to connect is found, but for some reason denying the client access. Client is trying to connect through an invalid port or it does not allow remote connections or a firewall issue.
Look here for full detailed explanation here:
Error message: TCP Provider.. - Cause & Resolution[
^]
MSDN Blog: (provider: TCP Provider, error: 0 - No connection..[
^]
If needed, troubleshoot more following this:
MSDN Blog: TCP Provider: No connection could be made because..[
^]
UPDATE:
Could not open connection...
Generally, it is
surface area configuration error or
sql service configuration issue. Have a look at this thread for potential reasons and resolutions:
Resolving A network-related or instance-specific error occurred while establishing a connection to SQL Server[
^]
If needed, See steps for setting up Surface area configuration
here..
Here, look at the following blog entries related to the same:
Under the default settings SQL Server does not allow remote connections[
^]
It says:
I. Make sure that Remote Connections are enabled in Surface Area Configuration tool
II. Check Whether TCP/IP protocol is enabled in the SQL Server Configuration Manager
III. Make sure that SQL server Browser service is running