Delphi Datasnap Socket Error 10061
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn asynchronous socket error 10061 delphi more about Stack Overflow the company Business Learn more about hiring developers or socket error 10061 connection refused delphi posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up DataSnap server socket error 10061 up vote 0 down vote favorite I have decided to move from SOAP servers to DataSnap servers & REST. I have viewed and followed several tutorials and even tried the DXE5 demos but I keep getting the same result. The issue is that I cannot connect the TSQLConnection on the client app to the DataSnap server that is running. Here is the Code : Socket Error # 10061 Connection refused.. OS = Windows 7 64bit RAD Studio XE5 Update 2 Following DataSnap multi-tier video tutorial by Pawel Glowacki (and ohters). In creating a Datasnap client/server app, I cannot connect the client TSQLConnection to the DSServer. The server is running (localhost)! Firewal de-activated. Added port 211 to Windows Firewall Inbound & Outbound rules. I have tried creating a DataSnat REST application and the same error occurs. I get the same results when doing this in DXE and DXE3. Steps to reproduce Create Datasnap server (Tried both DataModule & DSServerModule). Leave default port to 211 (Have also tried several other ports (8080, 9000). Run the server. All is OK up to here. Create a VCL Form App. Add a TSQLConnection to Main form. Set driver to DataSnap. CommunicationProtocol = tcp/ip. DataSnapCOntext = datasnap/ HostName = localhost (have tried 127.0.0.1 and my computer's IP address). LoginPropt = False. Run server. Start server. Open in browser works correctly. Set Connected property on TSQLConnection to true. Socket error 10061 is generated and I cannot get past this. Here is the stack trace. [5110E67F]{IndySystem190.bpl} IdStack.TIdStack.RaiseSocketError (Line 771, "IdStack.pas" + 42) + $21 [5110E606]{IndySystem190.bpl} IdStack.TIdStack.RaiseLastSocketError (Line 725, "IdStack.pas" + 1) + $F [5110E571]{IndySystem190.bpl} IdStack.TIdStack.CheckForSocketError (Line 699, "IdStack.pas" + 2) + $3 [5110A9F4]{IndySyste
Lines ... Andrzej Brzezinski wrote on 23-Nov-2012: I cannot get it a datasnap application to work when a server app is installed on another Windows computer. It works fine on the when both client and server run on the same system. I have opened the port I am using in the Firewall on both computers. 11 ... Bob Swart replied on 24-Nov-2012: Hi Andrzej, (snip) Which protocol are you using? When using HTTPS, are http://stackoverflow.com/questions/22678393/datasnap-server-socket-error-10061 you also deploying the SSL DLLs? Can you ping from one computer to another? Did you start the DataSnap Server on the other windows machine? (just 53 ... Andrzej Brzezinski replied on 24-Nov-2012: Hi Bob, Your message got me on the right track - I was setting Params dynamically and I used http://www.codenewsfast.com/cnf/thread/0/permalink.thr-ng1933q1434 'Host' instead of 'HostName'. But now, I am getting a different error : "Socket error 10060, connection timeout.' 16 ... Andrzej Brzezinski replied on 26-Nov-2012: It took me a while to find out that Filters on the client must be listed in reverse order compared to Filters on the server. Finally, everything seems to work now. Thank you, 7 ... Bob Swart replied on 26-Nov-2012: Hi Andrzej, (snip) Actually, if you do not specify the filters at all, they will be used automatically (and in the right order). Just make sure the units that define (and register) the filters are included in the uses clause somewhere in the client application... 43 FYI: Phrase searches are enclosed in either single or double quotes 24-Jul 11:00 utc Operating system upgrade in process, expect some down time. Originally created by [Tamarack] Sun, 09 Oct 2016 00:28:20 UTC Copyright © 2009-2016 HREF Tools Corp.
Hostname Server Exception handeling Socket errors [Edit] Subject: Exception handeling Socket errors [Edit] Posted by: Henrik Nedergaard Date: Wed, 9 Feb 2011 Hi I'm trying to capture "connection" error messages when I connect my clients to my server (datasnap server using tcp) - I receive an exception if e.g. the server is not running or if the hostname is wrong. e.g. I get this e.message +"Socket Error # 10061 Connection refused."+ but no errorcode? I need something like this, but "HelpContext" is always zero, and I don't see any exception class that I can use? using winsock; procedure TClientMainForm.ConnectToHost(AHostName : string); begin with ClientModule1 do try ADDSServer.Params.Values['Hostname'] := AHostName; ADDSServer.Connected := True; except on e:exception do begin case e.???? of WSAECONNREFUSED : begin // blah blah server not running end; WSAHOST_NOT_FOUND: begin // blah blah host xxx not found end; end; end; Edited by: Henrik Nedergaard on Feb 9, 2011 11:01 AMReplies Re: Exception handeling Socket errors posted by Henrik Nedergaard on Wed, 9 Feb 2011 Newsgroups.Archived.At is © Copyright 2009-2016, A B Cryer, All Rights Reserved.