[twsocket] HttpCli / LAN / Router / Proxy / ?Help!
Hello I am looking for some assistance regarding the use of HttpCli over a wireless LAN. I started using ICS recently from C++ Builder (5 Professional) as a more reliable alternative to the Netmasters components - in particular I used HttpCli successfully on a single computer connected to the internet. Last week I setup a home wireless network using a linksys access point to share my broadband connection - everything works OK and I have internet access and file sharing for all computers. I have since discovered that my program built using HttpCli does not work anymore, if run on any of the wirelessly connected computers, but works fine on my main PC (PC1) which is wired directly to the router. Home Network Setup : Linksys Router/Access Point/broadband connection - 192.168.1.1 PC1 - wired connection to router - 192.168.1.100 PC2 - wireless connection to router - 192.168.1.101 PC3 ....102 etc All the PCs run Windows XP SP2 with full updates, and the networking equipment is all from Linksys (router is a WAG200G). When run on any PC PC1 Httpprot.pas throws an exception when attempting to do a Get() - it returns a 400 with error message cannot resolve IP address. I have run the httptst sample program supplied with ICS and I get the same error. To fix the problem I have tried changing various properties of the HttpCli, e.g. setting the routers address as proxy,username/password, but without any luck. I looked for some differences between the computers setups - all Ifound was that the wired computer PC1 had no proxy in its browserconnection settings, while PC2 has automatically detect proxy settings. I have *not* tried changing any settings on the router itself, as to be frank, I am not very knowledgeable of it, and it seems to be working OK, apart from this. I have been checking the archives and while there are some similar queries, none quite seems to have the answer I need - e.g. http://lists.elists.org/pipermail/twsocket/2001-December/012228.html http://lists.elists.org/pipermail/twsocket/2004-January/024221.html http://lists.elists.org/pipermail/twsocket/2006-March/033175.html I am going to have a look at the ICS user-created sample code, some of which looks promising - i.e. iphelp, socketspy, proxyinfo and traceroute - but any immediate answers would be greatly appreciated. regards Joseph Benson -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
[twsocket] HttpCli / LAN / Router / Proxy / ?Help!
(in reply to Arno Garrels) Obviously name resolution does not work, are you able to browse the web with your favorite browser? Yes. Internet browsing and file sharing work as expected on all PCs. My program using HttpCli also works as well (- with no modifications or changes in settings), if run on PC1, but not on any of the others. Wasn't the error message can''t resolve hostname to IP address? Try to set both connection properties DNS server and default gateway in Windows to the IP of the router. In PC2 the gateway is set as the router IP (192.168.1.1), DNS servers are set to those of my ISP (I think), and in any case, ordinary web browsing works OK. These settings were made during the LAN setup procedure - which was a series of wizards on the Linksys installer - and have not been changed since. No fancy custom settings were made during the LAN setup, defaults were mostly used. I have been trying many combinations over several hours with the ICS httptst program, lately I have also been running the TCPIPMonitor application (nice little program!) as well to gain some insight, alas to my admittedly untrained eye, everything looks like it should, and everything else works OK. Baffling. (I would have thought the prog, after installation of the LAN, would either work everywhere or nowhere, but not selectively.) Taking a broader view would you think the solution is : 1. some change in the HttpCli properties, e.g. Proxy/ProxyPort/ ... etc? Perhaps which requires the information to be taken from somewhere in the registry. If so, what would these likely be, and where in the registry?? 2. a change in the routers settings; I have not made any changes here as in total there are about 120 different switches to choose from, and I wouldn't know where to begin. Random search isn't likely to succeed. 3. a change in window settings, somewhere. Obviously I am hoping for option 1, rather than 2 or 3, which run the risk of breaking something else. Eventually I hope to make my program a commercial application and putting might not work on a LAN for an unknown reason in the readme/install notes doesn't seem like the best solution. regards Joseph Benson -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
[twsocket] HttpCli / LAN / Router / Proxy / ?Help!
Could you try this: Run the command interpreter (command line). Enter telnet targethost 80 Then once telnet has connected, enter exactly GET / HTTP/1.0 (without quotes), then CTRL+M and CTRL+J (that is CR/LF pair). I did this and it worked OK on all PCs. You should get the answer from the webserver. If this doesn't work, then ICS HTTP client component wont work either. If it works, then something is wrong in your program. Check with HttpTst ICS demo. I have already been using the httptst demo program in my investigations - it gives the same error as my program (- my progam code is basically a little-modified version of the demo anyway.) Thanks for the suggestions so far - I am now going to go thru the list of ideas posted by Dave Baxter, some of which look promising. regards Joseph Benson -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
[twsocket] HttpCli / LAN / Router / Proxy / ?Help!
I have uploaded HttpTst executable at http://www.overbyte.be/arch/dump/HttpTst.zip. There is both ICS-V5 and ICS-V6 versions. Would you try with those versions and report here what is displayed (copy/pasted in your email, screen dump would be too large) in the two memos when you check Display header and execute the get query ? Try with http/1.0 and http/1.1, everything clear except URL and display header checkbox. Use http://www.overbyte.be as URL for testing. Hello again Francois, thanks for your swift response. Using http://.overbyte.be as test URL I found : Your result - You should see in upper memo: cute here Not using proxy cmd GET / HTTP/1.0 cmd Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */* cmd Connection: Keep-Alive cmd Accept-Language: en, fr cmd User-Agent: Mozilla/3.0 (compatible) cmd Host: www.overbyte.be cmd text/html = document.htm Location = http://www.overbyte.be URL = http://www.overbyte.be Document = document.htm RequestDone, no error. Status =200 StatusCode = 200 hdrHTTP/1.1 200 OK hdrDate: Sun, 13 Jul 2008 08:34:47 GMT hdrServer: Apache/2.2.6 (Win32) PHP/5.2.5 hdrLast-Modified: Wed, 31 Dec 2003 17:48:22 GMT hdrETag: 16f59-395-585ca310 hdrAccept-Ranges: bytes hdrContent-Length: 917 hdrKeep-Alive: timeout=5, max=100 hdrConnection: Keep-Alive hdrContent-Type: text/html cute here My result - Not using proxy cmd GET / HTTP/1.0 cmd Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */* cmd Connection: Keep-Alive cmd Accept-Language: en, fr cmd User-Agent: Mozilla/3.0 (compatible) cmd Host: www.overbyte.be cmd text/html = document.htm Location = www.overbyte.be URL = www.overbyte.be Document = document.htm RequestDone, no error. Status =200 StatusCode = 200 Your result- And in lower memo: cute here HTML HEAD TITLEOverByte - HomePage/TITLE [HTML code removed for clarity] /BODY /HTML cute here My result - HTML HEAD TITLEOverByte - HomePage/TITLE !-- START: Meta -- META HTTP-EQUIV=content-type CONTENT=text/html META NAME=Generator CONTENT=EditPlus 1.2 META NAME=AUTHOR CONTENT=[EMAIL PROTECTED] META NAME=OWNER CONTENT=François Piette META NAME=DESCRIPTION CONTENT=Freeware internet component suite - ICS - for Delphi, full source code META NAME=ROBOTS CONTENT=all META NAME=DISTRIBUTION CONTENT=global META NAME=RESOURCE-TYPE CONTENT=document META NAME=KEYWORDS CONTENT=ICS, MIDWARE, TCP, UDP, HTTP, SMPT, POP3, NNTP, FTP, TELNET, ICMP, FINGER, DELPHI, FREEWARE !-- END: Meta -- META HTTP-EQUIV=Refresh CONTENT=0;URL=frame_index.html /HEAD BODY BGCOLOR=#FF BRBRBR DIV ALIGN=center If you are not redirected automatically,BR [A HREF=frame_index.htmlClick Here/A] /DIV /BODY /HTML I get these results for *both* executables you sent me and for *both* PC1 and PC2 - everything thus seems to work perfectly, with no need for any messing around with routers and whatnot. Also, PC1 and PC2 were running slightly different versions of ICS, PC2 being the most up to date - that doesn't seem to be the problem either. This obviously seems really weird now - however, I think the answer is quite simple - ICS on PC2 has been corrupted in some way, so the next thing to try is a reinstall. I noticed when stepping thru HttpTst in the debugger, there is a line I think in the GET button click handler : HttpCli-Url = URLEdit-Text; ... etc for Proxy and so on - while URLEdit-Text was http://www.google.com; or whatever, when stepping over this line HttpCli-URL would remain as NULL in value, but I thought this was a problem with the debugger (which has its quirks) rather than ICS. regards Joseph Benson -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
[twsocket] HttpCli / LAN / Router / Proxy / ?Help!
everything thus seems to work perfectly, with no need for any messing around with routers and whatnot. This obviously seems really weird now - however, I think the answer is quite simple - ICS on PC2 has been corrupted in some way, so the next thing to try is a reinstall. Agreed. And simple to solve. A clean reinstall of the latest ICS did the trick. Many thanks for your help (Arno Garrels and Dave Baxter included) - without your suggestions I would probably have spent days attempting to reconfigure the router, which obviously was a complete red herring! regards Joseph Benson -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be