0
votes

I made a basic client / server datasnap applications and it work in local network through http but when I tried to connect from the internet I get connection refused, here are the steps I followed:

I set at the server component TDSHTTPService to connect through port no 8081 then in the client I set to use same port in TSQLConnection component, and I used my PC public IP in the HostName but when I try to connect I get connection refused.

Any advise ?

Forgot to say the client is Firemonkey app running on Android.

enter image description here

1
Do you have public IP? Are you behind a router / NAT? It is very likely that the problem is that your request does not even reach your computer because it is blocked in the middle. - smooty86
@smooty86 yes, the server is behind a router running on windows 7 and the client is an Android app , what I should do ? - zac
You should go to router admin console, find something like "port forwarding" and route the port (8081) to your computer IP - you have to say the router that traffic on this port should go to your computer ;) - smooty86
@smooty86 +1 yaaaay ..... that did it, many thanks, post it as an answer if u like - zac

1 Answers

0
votes

You should go to router admin console, find something like "port forwarding" and route the port (8081) to your computer IP - you have to say the router that traffic on this port should go to your computer