Problem handling Redirects with MSXML2.XMLHTTP

vb6 , msxml2.xmlhttp , web Durham, United States
  • 12 years ago
    I am having a problem handing redirects in vb with MSXML2.XMLHTTP. What happens is it never sees the redirects, it automatically forwards to the next link without my knowledge. I am working on an application that speaks to the webpage. All is fine until I get to the part where I am about to download the file. When I "POST" the data that it is requesting the source of the html is suppose to post a link to a file. It does the samething in the browser. Once you submit the data it automaticly starts downloading the file. The issue I have with that is I can not get the header information before it starts the download which in turn makes it impossible for me to get the filename. So I have no clue what to save the fileas. Any suggestions? *update... i found a component that does prevent the redirects and will show the headers of the redirect page which includes the link to the file. But I would still rather use xmlhttp because it is free.
  • 12 years ago
    raising hand for help!
  • 12 years ago
    I found out while researching it is not possible with xmlhttp. Maybe in the future, but until then I will have to rewrite the code using winhttprequest, which has an api call to prevent redirects.. which would solve my issue.

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“If Java had true garbage collection, most programs would delete themselves upon execution.” - Robert Sewell