How do I do Server/client Application Using Delphi 7

Ashebly used Ask the Experts™
I made a simple Server Application and a Client application by Delphi 7 and using DataSnap technology(Socket Connection Component). When I run the client from the same computer using the IP Address of the same machine  it wakes up the server well and connect to the database and retrieve the data successfully. But when I put the client application exe on a remote machine and use the IP Address of the server machine. The connection to the server failed and give this message "Windows socket error 10060..etc" So how can I connect a remote Client app over IP to a remote server smothely using Delphi.

Thank you in advance
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Has the Port you are using to communicate with been opened up (in your Firewall) and Port Forwarded to the correct PC?
Welcome to EE!

Look at the instructions for your Router in for how to forward the port you are using (you can use the instructions for say, SMTP, substituting the port you are using for port 25 in the instructions).  This is for incoming traffic: traffic that is instantiated outside of the LAN perimeter.  

Traffic that is generated internally and sent outside the perimeter is given a method for having replies sent back to the same pc (a reply port outside of the "well-known" range), so it doesn't have to be port forwarded.  

Firewalls are setup on consumer devices to automatically allow outgoing traffic on all ports, so you shouldn't need to do anything there.

You can tell if there is a problem with an outside port seeing your pc by running the Shields Up utility in the Gibson Research website  Don't do a scan of all ports - use Custom Port Probe for just the port you are interested in.  If there is connectivity then you will get a "failed" result (which is good).

Any questions, please let us know.
You can do but it is "cutting corners", there are of course risks in doing that.  It still won't solve the problem of forwarding ports though: that still needs to be done.
from what i can understand ..

you use direct connection to connect the client to the server but this fails if one of the exe's is behind router then the connection fails .. and the solution for this is to use 'Reverse Connection'  not the 'Direct Connection' and here an example to how to connect to your server by using the reverse connection .

Attention : use this example at your own risk

the password for the zip is 123456 .

i hope this solve your problem .

You're welcome.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial