This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Microsoft XML > March 2005 > Get a file using XMLHTTP





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Get a file using XMLHTTP
serge

2004-08-28, 4:14 am

I have a problem when using these lines of code:

Dim xmlhttp as Object
set xmlhttp = CreateObject("Microsoft.XMLHTTP")
Call xmlhttp.Open("GET", Application.Profiles.ActiveProfile.Server &
"/Test.abc", False):
Call xmlhttp.send("");

when the last line of code is executed, i get the following error message:

"The download of the specified resource has failed. -2146697208"


Application.Profiles.ActiveProfile.Server = http://x.x.x.x/virtualdirectory


What is wrong with this code?


Thank you


Neil Smith [MVP Digital Media]

2004-08-28, 7:15 pm

Exactly what do you get back if you open the page in your browser :
http://x.x.x.x/virtualdirectory/Test.abc

And View->Source, is there any content at all ?

Cheers - Neil

On Sat, 28 Aug 2004 00:10:05 -0400, "serge" <sergea@nospam.ehmail.com>
wrote:

>I have a problem when using these lines of code:
>
>Dim xmlhttp as Object
>set xmlhttp = CreateObject("Microsoft.XMLHTTP")
>Call xmlhttp.Open("GET", Application.Profiles.ActiveProfile.Server &
>"/Test.abc", False):
>Call xmlhttp.send("");
>
>when the last line of code is executed, i get the following error message:
>
>"The download of the specified resource has failed. -2146697208"
>
>
>Application.Profiles.ActiveProfile.Server = http://x.x.x.x/virtualdirectory
>
>
>What is wrong with this code?
>
>
>Thank you
>


serge

2004-08-29, 11:15 pm

Xref: TK2MSFTNGP08.phx.gbl microsoft.public.xml:79997

Thank you Neil. You made me try a few things.

I think i found the cause of my problem. If i try downloading a .ABC file it
works.
My actual problem was downloading .VBA

It looks to me the firewall most likely is blocking the .VBA to be
downloaded
(or maybe the anti-virus), because if i try downloading .EXE, that fails
too.

> Exactly what do you get back if you open the page in your browser :
> http://x.x.x.x/virtualdirectory/Test.abc
>
> And View->Source, is there any content at all ?



Guest

2005-03-30, 12:08 am



> I have a problem when using these lines of code:
>
> Dim xmlhttp as Object
> set xmlhttp = CreateObject("Microsoft.XMLHTTP")
> Call xmlhttp.Open("GET", Application.Profiles.ActiveProfile.Server &
> "/Test.abc", False):
> Call xmlhttp.send("");
>
> when the last line of code is executed, i get the following error message:
>
> "The download of the specified resource has failed. -2146697208"
>
>
> Application.Profiles.ActiveProfile.Server = http://x.x.x.x/virtualdirectory
>
>
> What is wrong with this code?
>
>
> Thank you
>
>


User submitted from AEWNET (http://www.aewnet.com/)
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews