From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can Load a URL with Browser, but not with URL Get HTTP Document.vi - Any Takers?

OK, I'm about at my wit's end on this one. Here's the URL:
 
 
I can type this right into my browser address bar and bring it up. However, if I try and use the vi "URL Get HTTP Document.vi" that comes with LabVIEW, it get a 404.
 
Any ideas on why I can see this with IE7, and not with this vi? If you can do it on your machine, please let me know and I'll look inwards for a solution!
0 Kudos
Message 1 of 21
(4,987 Views)

Hi Wiredup,

      Here's one of several posts on this general subject.  I can't find the example VI you mentioned - maybe it's a LV8.x?  Anyway, if appending "[text]" to the URL doesn't work for you, maybe the attached "IWebBrowser" example will give you an alternative idea.(?)

Cheers!

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 2 of 21
(4,976 Views)
For me it works. Is it possible that you need to use a proxy to access the internet? The URL Get HTTP Document doesn't support proxys.
0 Kudos
Message 3 of 21
(4,975 Views)
Thanks all for your quick replies! The vi in question is shipped with the Internet Toolkit and is located (on my computer) here:
 
  C:\Program Files\National Instruments\LabVIEW 7.0\vi.lib\addons\internet\url\url.llb\URL Get Document.vi
 
"tbd", would you be so kind to save that vi IWebBrowser.vi as V7.0 or earlier (I'm not up to speed on LV Releases yet). I cannot find it by searching the forums.
 
Dan_u, thanks for the info - I'm straight connected to my router (no proxies). That's great that it works for you. I've attached a quickie example that shows my implementation. Is this what you did to check it? I'm thinking about re-writing this vi to make it more robust (will post back if I head out on that mission!).
 
 
0 Kudos
Message 4 of 21
(4,954 Views)
Hi wiredup
I used the same code. Here's what I get in content:

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<META HTTP-EQUIV="Expires" CONTENT="-1">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">

<title>Startup Ping Page</title>
</head>

<body>

This page is for internal testing only.

</body>
</html>


I'm also right behind a router. I don't know why this doesn't work for you...
Probably you can try to switch on the "Highlight Execution" mode for the URL Get HTTP Document SubVI (make it non-reentrant first) and see what happens.


0 Kudos
Message 5 of 21
(4,945 Views)

That would be correct - hmmmm. I get a 404 error, so I've got to do some digging on this end. The odd thing is that I can pull up the index.htm page at this root URL if I don't specify a file name. If I specify a file name (like in this example), I get the 404. I can also fetch files, by name, from other web sites.

Thanks for checking - If I find a solution, I'll post it here.

0 Kudos
Message 6 of 21
(4,943 Views)
Just guessing... could it be the underscore that causes problems? You can try to replace the underscore by its hex value, i.e.:
http://www.invicis.com/%5Fpvtpages/startping.htm

0 Kudos
Message 7 of 21
(4,940 Views)

Great idea! Unfortunately, it does not seem to be the underscore. I can pull this URL up in the browser:

http://www.invicis.com/index.htm

But not with URL Get HTTP Document.  I'm taking apart this vi right now to find out where it's failing. So far it appears to be on first "Get..." written to the server.

0 Kudos
Message 8 of 21
(4,937 Views)
Probably it will lead to the same result, but as a crosscheck you could try telnet from the command line.
Open a command prompt, then type "telnet www.invicis.com 80" (without the ", this will open a connection on port 80).
Now type exactly (*RET* stands for Return key)
GET /_pvtpages/startping.htm HTTP/1.0*RET*
Host: www.invicis.com*RET*
*RET*


You should get the page contents...

0 Kudos
Message 9 of 21
(4,929 Views)
Sounds like no matter what I do to the vi, this is not going to work from my computer. Here's the string returned via telnet. The returned string is below. Now if I could just figure out how IE7 get's around this problem!
 
HTTP/1.1 404 Not Found
Date: Wed, 28 Feb 2007 17:08:25 GMT
Server: Apache/1.3.34 Ben-SSL/1.57 (Unix) mod_gzip/1.3.26.1a mod_fastcgi/2.4.2 m
od_throttle/3.1.2 Chili!Soft-ASP/3.6.2 FrontPage/5.0.2.2635 mod_perl/1.29 PHP/4.4.2
Connection: close
Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>404 Not Found</TITLE>
</HEAD><BODY>
<H1>Not Found</H1>
The requested URL /_pvtpages/startping.htm was not found on this server.<P>
<HR>
<ADDRESS>Apache/1.3.34 Ben-SSL/1.57 Server at default.page Port 80</ADDRESS>
</BODY></HTML>

Connection to host lost.
 
0 Kudos
Message 10 of 21
(4,921 Views)