I use InternetOpenUrl to fetch the contents of a webpage. It works
in XP but in Vista it returns a "not logged in" page from the target
website. When you go to the page in Internet Explorer it displays
properly.
Anybody had experience with this problem?
I don't know about Vista, but I wonder if another
method might be easier? There's UrlDownloadToFile,
which is a simple file-downloading call.
If you want to communicate more directly with the
server you can also do it using winsock, bypassing the
Internet* APIs that are IE-connected:
www.jsware.net/jsware/vbcode.php5#htp
> I use InternetOpenUrl to fetch the contents of a webpage. It works
> in XP but in Vista it returns a "not logged in" page from the target
> website. When you go to the page in Internet Explorer it displays
> properly.
>
> Anybody had experience with this problem?
mark.tunnard.jackson@googlemail.com - 30 Jul 2008 18:16 GMT
I've never tried it, but Karl Peterson has a sample for fetching
webpages without API calls or Winsock. It uses the native capability
of VB5/6 UserControls to do downloads (including asynchronously).
Might be worth a try?
http://vb.mvps.org/samples/project.asp?id=netgrab
jim evans - 30 Jul 2008 18:58 GMT
>I've never tried it, but Karl Peterson has a sample for fetching
>webpages without API calls or Winsock. It uses the native capability
>of VB5/6 UserControls to do downloads (including asynchronously).
>Might be worth a try?
>
>http://vb.mvps.org/samples/project.asp?id=netgrab
Thanks, but I think that does file downloads, not a fetch of webpage
source. Also, I don't think it handles logon cookies either.
mayayana - 30 Jul 2008 19:32 GMT
> Thanks, but I think that does file downloads, not a fetch of webpage
> source. Also, I don't think it handles logon cookies either.
Downloading the file or fetching the webpage source
are the same thing. It sounds like your real issue might
be with different cookie settings on the two machines?
jim evans - 30 Jul 2008 18:35 GMT
> I don't know about Vista, but I wonder if another
>method might be easier? There's UrlDownloadToFile,
>which is a simple file-downloading call.
>www.jsware.net/jsware/vbcode.php5#htp
Thanks, but that I don't think UrlDownloadToFile handles cookies
required to supply logon information.