Delphi Socket Error #11001 Host Not Found
Contents |
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 socket error 11001 host not found windows 7 Learn more about Stack Overflow the company Business Learn more about hiring developers
Socket Error 11001 Host Not Found Hatası
or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack socket error 11001 host not found nedir 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 Delphi connection test with TIdFTP up vote -1
Socket Error 11001 Host Not Found Jane
down vote favorite On my program I'm actually using this code: if IdFTP1.Connect = True then begin //makes some stuff end else begin ShowMessage('you got the move like jagger.'); end; If I am not connected I see an error like Socket Error #11001 Host not found To avoid this, I thought that I could use the code you see above but I am having an error when socket error 11001 error number 0x800ccc0d I use IdFTP1.Connect = True. What could I do? delphi indy indy10 delphi-xe4 share|improve this question edited Jul 31 '13 at 22:40 Sir Rufo 10.7k21845 asked Jul 31 '13 at 22:11 Alberto Rossi 7621438 2 The Connect method is currently a procedure, not a function. Which version of Indy are you using ? –TLama Jul 31 '13 at 22:19 1 And please don't tell us that you got an error without quoting the error message –Sir Rufo Jul 31 '13 at 22:22 2 Connect() has NEVER returned a Boolean in any version of Indy. It has ALWAYS raised an exception on error instead. –Remy Lebeau Jul 31 '13 at 22:22 1 You can't avoid it, you need to catch it. –Remy Lebeau Jul 31 '13 at 22:24 2 Read sscce.org and think about other users searching for help (some just search for that error message). –Sir Rufo Jul 31 '13 at 22:34 | show 6 more comments 1 Answer 1 active oldest votes up vote 6 down vote accepted Connect() does not return a Boolean if it fails. It raises an exception instead: try IdFTP1.Connect; try //makes some stuff finally IdFTP1.Disconnect; end; except ShowMessage('you
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the
Socket Error 11001 H1z1
workings and policies of this site About Us Learn more about
Socket Error 11001 Error Number 0x800ccc0d Outlook Express
Stack Overflow the company Business Learn more about hiring developers or 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. http://stackoverflow.com/questions/17981870/delphi-connection-test-with-tidftp Join them; it only takes a minute: Sign up Host not found - Trying to download a csv file using Indy in Delphi XE7 up vote 0 down vote favorite I'm trying to download a csv from the .gov.uk website, however, when I run the procedure an error is displayed: Socket Error 11001 Host not found. procedure TFrm_Settings.btn_FetchPricesClick(Sender: TObject); http://stackoverflow.com/questions/28430014/host-not-found-trying-to-download-a-csv-file-using-indy-in-delphi-xe7 var Url, LocalFile: String; FileStrm: TFileStream; Http : TIdHTTP; begin Url := 'http://www.gov.uk/government/uploads/system/uploads/attachment_data/file/400489/weekly_fuel_prices_csv.csv'; LocalFile := 'FuelPrices.csv'; FileStrm := TFileStream.Create(LocalFile, fmCreate); Http:= TIDHTTP.Create(nil); try try Http.Get(Url, FileStrm); finally FileStrm.Free; end; except DeleteFile(LocalFile); raise; end; delphi csv delphi-xe indy share|improve this question asked Feb 10 '15 at 11:01 Riley 12 3 That request is redirected, so set Http.HandleRedirects := True before you perform it. P.S. fix your try..finally..except blocks. –TLama Feb 10 '15 at 11:04 Thanks for the quick reply, I added the Http.HandleRedirects := True, but am still experiencing the same error. I also tried accessing several other csv files, with the same result. –Riley Feb 10 '15 at 15:28 Could this be due to the fact that the network I am on uses a proxy? –Riley Feb 10 '15 at 15:31 The error means that the local PC cannot resolve the hostname via DNS. Since the network is using a proxy, you need to connect TIdHTTP to the proxy and let the proxy resolve the DNS.
Sidebar General FAQ How To's Video Tutorials Reference Guide Troubleshooting how_to:11001 https://wiki.pscs.co.uk/how_to:11001 Socket Error 11001 - Host not found (authoritative answer) This means that the ISP POP3 or SMTP server which you have told VPOP3 to connect to does not currently exist. This might be that you have mistyped the server address, or socket error that your ISP is having temporary problems, or that you are using an internal DNS server or proxy which is either slow or not configured correctly. The first thing to do is to go to the VPOP3 settings, then External Mail → socket error 11001 In Mail (if the error is a 'POP3 Client Error') or Out Mail (if the error is an 'SMTP Client Error'), and check the server addresses are correct - contact your ISP if you are not sure. Also, try PINGing the server addresses from a DOS prompt on the VPOP3 computer - this will show if Windows on that PC is able to resolve the server names to numeric IP addresses correctly. If VPOP3 is connecting through a router or proxy server, then the DNS server settings on the VPOP3 computer (in Control Panel → Network → TCP/IP) could be set incorrectly as well. 11001, dns, winsock, error code how_to/11001.txt · Last modified: 2015/09/23 13:46 (external edit) Page Tools Show pagesourceOld revisionsBacklinksBack to top