[twsocket] HttpCli / LAN / Router / Proxy / ?Help!

2008-07-14 Thread Joseph A Benson
>> 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


Re: [twsocket] HttpCli / LAN / Router / Proxy / ?Help!

2008-07-13 Thread Francois PIETTE
> 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.

--
[EMAIL PROTECTED]
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

-- 
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!

2008-07-13 Thread Joseph A Benson
> 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
> hdr>HTTP/1.1 200 OK
> hdr>Date: Sun, 13 Jul 2008 08:34:47 GMT
> hdr>Server: Apache/2.2.6 (Win32) PHP/5.2.5
> hdr>Last-Modified: Wed, 31 Dec 2003 17:48:22 GMT
> hdr>ETag: "16f59-395-585ca310"
> hdr>Accept-Ranges: bytes
> hdr>Content-Length: 917
> hdr>Keep-Alive: timeout=5, max=100
> hdr>Connection: Keep-Alive
> hdr>Content-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 
> 
> 
>  OverByte - HomePage
> 
>  [HTML code removed for clarity]
> 
> 
> 
>  cute here 

My result -



OverByte - HomePage


















If you are not redirected automatically,
[Click Here]




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


Re: [twsocket] HttpCli / LAN / Router / Proxy / ?Help!

2008-07-13 Thread Francois PIETTE
>> 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

If telnet works, HttpTst program has to work also. It does exactly the same 
thing. If it doesn't work, maybe you have something corrupted in your ICS 
installation.
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.

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
hdr>HTTP/1.1 200 OK
hdr>Date: Sun, 13 Jul 2008 08:34:47 GMT
hdr>Server: Apache/2.2.6 (Win32) PHP/5.2.5
hdr>Last-Modified: Wed, 31 Dec 2003 17:48:22 GMT
hdr>ETag: "16f59-395-585ca310"
hdr>Accept-Ranges: bytes
hdr>Content-Length: 917
hdr>Keep-Alive: timeout=5, max=100
hdr>Connection: Keep-Alive
hdr>Content-Type: text/html
 cute here 


And in lower memo:
 cute here 


 OverByte - HomePage

 [HTML code removed for clarity]



 cute here 

Regards,
--
[EMAIL PROTECTED]
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

-- 
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!

2008-07-12 Thread Joseph A Benson
> 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


Re: [twsocket] HttpCli / LAN / Router / Proxy / ?Help!

2008-07-11 Thread Dave Baxter
You could put your own entries in the systems Hosts files.  So that for
example "PC1" would resolve to 192.168.1.100.  One "set" of entries
common to all machines should do the trick...

Find that file at...
C:\WINDOWS\system32\drivers\etc in XP.

Add entries such as.
192.168.1.100 PC1
192.168.1.101 PC2

Note!  Only put entries in a PC's file, for the "Other" PC's on the
network, not itself.

Windows (and many other OS's) will always look up the Hosts file entry,
before doing an DNS queries.  So, anything in there takes presidence.
This is also one way to hijack a PC, though not very common now, as it's
too well known, and easy to fix.

But...

If you have all the PC addresses assigned by DHCP from the router (the
normal way these days) they could change outside of your control, when
they power up next time.

Solutions.

Firstly, do not use "automaticly detect settings" in the Internet
setting dialog.  It is posible for that protocol to "get out" and your
PC connection then gets diverted via "someone else".  It's rare, but it
can happen.

Set each PC to use your router as their DNS servers, this may be done by
DHCP too.  The router itself will then pass the request for sites
unknown to it, to your ISP, and keep a local copy of the most frequent
ones you use, well some routers do that, your PC's do not need to know
anything about your ISP, only the router needs that info.

If the router supports it (most do) use "LAN address reservation" so
that it will always keep one particular address reserved for a
particular MAC address, regardless of if it is is connected or not.  You
can usualy set up many such entries.

Fixed addresses at each PC.  That may be OK for machines that dont
physicaly move outside your network, but any laptops would then need
some fiddling to allow to connect to a "Hotspot" or other LAN.

Check that any instances of the XP firewall, has the appropriate
exceptions enabled for your application, and to allow incomming
connections from other "Trusted" PC's on your own LAN.

As you are behind a router, you could probably disable the XP firewall.
But, if one other PC "picks up something malicious" when surfing the
web, that could then get to the other unprotected PC's if their
firewall's are down, if it wanted to.

You may also find that the router (again, many offer this.. "Wireless
Isolation" Netgear call it for example) will activly prevent a wireless
machine, from "seeing" any other wireless connected devices!  Good if
you run a hotspot, but an absolute pain if you just want a home LAN.
If you have file sharing working OK between the WiFi PC's, at least that
should not be the problem.

Lastly, when you have all the WiFi gadgets working with each other,
learn how to, and use WPA/PSK encryption for the WiFi.  XP makes it very
easy to get multiple machines all connected to the same router/accress
point, so long as you have a USB stick to move the settings arround
with.   But, please use a "Good" passphrase for the WPA key
(non-dictionary words and numbers) or there is a remote chance it could
be discovered with a "dictionary attack"...

NOTE!  This is not the same as someone useing one of the WEP crackers,
WEP (NOT WPA) has a well known vulnerability.  WPA with a good key
phrase, is regarded as all but unbustable.


Take a look at www.grc.com, they have a lot of good information as to
how "The Net" and TCP/IP works.

Hope something helps..

Dave B.


> -Original Message-
> From: Joseph A Benson [mailto:[EMAIL PROTECTED] 
> Sent: 10 July 2008 14:10
> To: twsocket@elists.org
> Subject: [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 
> n

Re: [twsocket] HttpCli / LAN / Router / Proxy / ?Help!

2008-07-11 Thread Francois Piette
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).
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.

btw: "targethost" is something like www.codegear.com, that is the host name
part of an URL. Don't prefix with "http://";.

--
[EMAIL PROTECTED]
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
http://www.overbyte.be

- Original Message - 
From: "Joseph A Benson" <[EMAIL PROTECTED]>
To: 
Sent: Friday, July 11, 2008 12:49 PM
Subject: [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

-- 
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!

2008-07-11 Thread Joseph A Benson
(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


Re: [twsocket] HttpCli / LAN / Router / Proxy / ?Help!

2008-07-10 Thread Arno Garrels
Obviously name resolution does not work, are you able to browse 
the web with your favorite browser?
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.

--
Arno Garrels

  
Joseph A Benson wrote:
> 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!

2008-07-10 Thread Joseph A Benson
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