Home > Back-end >  How to connect my vcl client to my vcl server remotely using datasnap from delphi
How to connect my vcl client to my vcl server remotely using datasnap from delphi

Time:05-26

I am using Windows 11 Pro.

I am on a local network, and I am using a No-IP address and connected to No-IP address.

I opened port 7777 on my Windows firewall and my router.

I have created a server DataSnap application (Windows VCL) and a client DataSnap application (Windows VCL).

Server components:

DSServer1
DSServerClass1 connected to DSServer1
DSTCPServerTransport1 connected to DSServer1
DSTCPServerTransport1 Port = 7777

Client components:

SQLConnection1
Driver = DataSnap
ConnectionName = DataSnapCONNECTION
Params [ DriverName = DataSnap , HostName = ?????.ddns.net , Port = 7777 , ConnectionName = DataSnapCONNECTION ]

When running the server and trying to connect SQLConnection1 from the client side, if I connect to localhost or 127.0.0.1 or my local network IP 192.168.1.7, it connects successfully.

But, if I try to connect to my No-IP host, I get a error

Socket Error # 10060
Connection timed out

CodePudding user response:

I solved my problem The problem was I was trying to connect to the server through the same network So I tried to connect from another computer connected to another internet network and it worked fine

  • Related