Connecting Tech Pros Worldwide Help | Site Map
 
 
LinkBack Thread Tools Search this Thread
  #1  
Old July 19th, 2005, 02:55 PM
serge
Guest
 
Posts: n/a
Default Get a file using XMLHTTP

Is this the correct newsgroup for this posting?


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


  #2  
Old July 19th, 2005, 02:55 PM
Bob Barrows [MVP]
Guest
 
Posts: n/a
Default Re: Get a file using XMLHTTP

serge wrote:[color=blue]
> Is this the correct newsgroup for this posting?[/color]

Only if you are doing this in server-side asp code. If you are doing it in
client-side code, then .scripting.vbscript would be your best bet, unless
you need to support non-IE browsers, that is, in which case
..scripting.jscript would be better.
[color=blue]
>
>
> I have a problem when using these lines of code:
>
> Dim xmlhttp as Object[/color]

No, you're definitely in the wrong place. This is not vbscript, so it can't
be ASP.

Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


  #3  
Old July 19th, 2005, 02:56 PM
serge
Guest
 
Posts: n/a
Default Re: Get a file using XMLHTTP

Thank you Bob for pointing me to the correct newsgroup, i will post in there
next time for
vbscript related code.

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.

[color=blue][color=green]
> > Is this the correct newsgroup for this posting?[/color]
>
> Only if you are doing this in server-side asp code. If you are doing it in
> client-side code, then .scripting.vbscript would be your best bet, unless
> you need to support non-IE browsers, that is, in which case
> .scripting.jscript would be better.
>[color=green]
> >
> >
> > I have a problem when using these lines of code:
> >
> > Dim xmlhttp as Object[/color]
>
> No, you're definitely in the wrong place. This is not vbscript, so it[/color]
can't[color=blue]
> be ASP.[/color]


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 205,248 network members.