0

I am getting an error while trying to connect to SQL Server with public IP.

I tried many things Adding port 1433in firewall but still it is showing the below error.

TITLE: Connect to Server

Cannot connect to XXX.xxx.xx.xx ,1433.

ADDITIONAL INFORMATION:

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.) (Microsoft SQL Server, Error: 10061)

No connection could be made because the target machine actively refused it

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • Possible duplicate of [Why am I getting "Cannot Connect to Server - A network-related or instance-specific error"?](http://stackoverflow.com/questions/18060667/why-am-i-getting-cannot-connect-to-server-a-network-related-or-instance-speci) – Ave Mar 27 '17 at 09:17
  • I am using SQL server 2008R2 there is no surface area configuration. – Sachin Verma Mar 27 '17 at 09:24
  • I did that all but still facing the same error. – Sachin Verma Mar 27 '17 at 09:26
  • Please post your connection string in `web.config` if your application is website. – Ave Mar 27 '17 at 09:49
  • Are you enabled TCP/IP optional? Or your SQL services is running? – Ave Mar 27 '17 at 09:52
  • basically i want to access the SQL server remotely, If i am typing local ip/SQLExpress it is accepting and running, but i am adding Public IP/SQLEXpress or Public IP, 1433 it is not opening and showing above error. I want to access SQL Server from my window application from anywhere around the world thats why i am using Public IP. and port 1433 – Sachin Verma Mar 28 '17 at 04:32
  • 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.) (Microsoft SQL Server, Error: 10061) No connection could be made because the target machine actively refused it – Sachin Verma Mar 28 '17 at 04:38
  • Are you own target machine? – Ave Mar 28 '17 at 04:58
  • yes i owner it.. – Sachin Verma Mar 28 '17 at 16:55
  • Hiee @vanlocare you there? – Sachin Verma Apr 08 '17 at 04:14
  • hiee @vanloc are you there? – Sachin Verma Apr 08 '17 at 04:15
  • I tried all to help you. You should see my link was post again or remove your SQL server. – Ave Apr 08 '17 at 04:28
  • @varloc i am posting again with pictures please check the error.I will be pleased if you can help – Sachin Verma Apr 08 '17 at 04:36
  • http://stackoverflow.com/questions/43290311/sql-server-public-ip-connectivity-error @varloc please check – Sachin Verma Apr 08 '17 at 04:50

0 Answers0