View Full Version : %IsConnected% and proxy/firewall functions
TJ_Tigger
04-15-2003, 10:45 AM
I am having a problem with the %IsConnected% function. When I try to use it on my work computer it does not work (proxy and firewall and all the good junk) but if I use it at home it works fine (personal firewall). Is there a way to make the Check internet functions work throught a proxy? I know with the Download from Web functions there are port numbers, connection timeouts, and proxy settings. Why not have this for the %IsConnected%. I can download stuff from the web, but if the %IsConnected% does not have the proxy settings, I can't check to see if it will work. Here is a sample of the code I am using.
<font color=green>%IsConnected% = Internet.CheckConnection ("www.agilent.com/")
%Result% = Dialog.MessageBox ("Title", "%IsConnected%", Ok, Question)
IF (%IsConnected%)
Page.Jump ("Web")
ELSE
%Result% = Dialog.MessageBox ("Error Connecting . . .", "A connection to the Internet w...", Ok, Exclamation)
END IF</font color=green>
Derek
04-15-2003, 11:02 AM
Whats happening with errors Tig - I assume your getting FALSE returned?
Is there a prob with IsConnected? ... coz mine is returning TRUE whatever address i put in [http://www.qpwoeiruty.com/] ... even if i leave it blank!
Lorne
04-15-2003, 11:12 AM
I think it has a backup address that it uses if the one you supply fails...
TJ_Tigger
04-15-2003, 01:47 PM
It is returning false, but I know that there is internet connectivity. I have tried a few different URLs to see if one would work better (Quicker) than the others. I can use IE to go to the web page just fine but it takes about 20-30 seconds to check the connection and returns FALSE to my screen. It is weird as well, but the ELSE option does not stay on the screen. It flashes and then disappears. Weird actions.
Like I said, the same script on my Home PC works. There is nothing blocking port 80 outbound and web traffic is still port 80 at home, but my work PC which connects through a VPN and thus a firewall at work does not work. When I disconnect the VPN it does work so it leads me to believe that the %IsConnected% is not dynamic enough to take this type of a work environment into consideration.
Should I make this a suggestion for a future release of AMS? The ability to use proxy information in the Check Internet Connection.
Thanks
Tigg
TJ_Tigger
04-15-2003, 01:50 PM
I should also mention that the %IsConnected% works with the VPN disconnected but the Web Browser no longer works, unless I disable my proxy. I can't seem to get both of them to work at the same time.
TJ_Tigger
04-15-2003, 02:20 PM
Download from Web function does not want to work either. I tried to check what the %Proxy*% variables were returning and they were empty. Are these built in variables, or do I need to run something first (i.e., prompt user) to populate them.
TJ_Tigger
04-16-2003, 01:28 PM
Ok, I found the Proxy setting dialog box in the Dialog actions, but am still having trouble with an internet download. The errors that I get are dealing with error code 99, which it states is an unknown error code.
Any Ideas.
kaylward
04-16-2003, 03:03 PM
Does your site use a proxy autoconfiguration file? I've never been able to get that to work. I can read the proxy server name and port from the registry, except in cases where a PAC file is used... This of course leads to the IsConnected failing, since I an not detecting and passing the proxy server info. I had to hard code it for a big client... You can open the PAC file with notepad and find the values...
TJ_Tigger
04-16-2003, 04:48 PM
Yes we do. So I can use the web browser through AMS but the %IsConnected% and Download Web File actions will not work at this point . . .
Thanks for sharing your experience kaylward.
Tigg
Brett
04-16-2003, 04:59 PM
We will certainly look at adding download functions that go through the IE interface for a future version. As well, we will take a look at ways to better detect proxy settings. Thanks for the feedback, everyone.
kaylward
04-17-2003, 01:00 PM
FWIW...
I have SUF60 actions to detect proxy and port from the registry here:
http://orioninformationsystems.com/downloads/isconnect.zip
I don't remember if they can be imported into AMS... I'm away from my machine... They can be read into SUF60 to see the logic.
TJ_Tigger
04-18-2003, 09:59 AM
I don't have SUF so I don't think I will be able to use the files. Can they be exported to .xml or txt so I could read them?
kaylward
05-05-2003, 02:36 PM
There's not to much to see in your circumstance (i.e. with a PAC). The issue is that the proxy is stored in the registry as one big string (i.e. Proxy=www.company.com:8080) and you need to extract the proxy server name and port number. It's just a bunch of string maniputlation.
rball
05-12-2003, 05:33 AM
Tigger,
Did you get anywhere with this as I have exactly the same problem?
Russ
TJ_Tigger
05-12-2003, 12:04 PM
No I have not gone back to it yet. I have been side tracked on to other projects. I will let you know when I do though. To warn you it won't be for a while.
tigg
rball
05-12-2003, 12:35 PM
OK thanks
I've taken out the code and left it to fail in the browser, not great but better this way than the other.
Russ
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.