473,394 Members | 1,701 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Empty file problem

Hello all,
I created a cheap download script to download files. It works great on
almost ever user we have, except for a few. I think there is some type of
configuration problem on the server or browser, but I wanted to check with
you guys first.

Here is the script.

Set objXML = Server.CreateObject("Microsoft.XMLHTTP")
objXML.Open "GET", FilePath, False
objXML.Send

'// SafeFullFileName is the file we are downloading. We check to be sure
it exists, right format, etc.

Response.AddHeader "content-disposition","attachment;filename=" &
SafeFullFileName
Response.ContentType = "application/" & SafeFullFileName
Response.BinaryWrite objXml.ResponseBody

Set objXml = Nothing
Thanks for the help.

cross posted at microsoft.public.scripting.vbscript
Jul 22 '05 #1
1 1493
Forgot to write... the file is empty after the download completes.

"JackRabbit" <ja**@rabbit.com> wrote in message
news:MTKQd.42187$EG1.20867@lakeread04...
Hello all,
I created a cheap download script to download files. It works great on
almost ever user we have, except for a few. I think there is some type of
configuration problem on the server or browser, but I wanted to check with
you guys first.

Here is the script.

Set objXML = Server.CreateObject("Microsoft.XMLHTTP")
objXML.Open "GET", FilePath, False
objXML.Send

'// SafeFullFileName is the file we are downloading. We check to be sure it exists, right format, etc.

Response.AddHeader "content-disposition","attachment;filename=" &
SafeFullFileName
Response.ContentType = "application/" & SafeFullFileName
Response.BinaryWrite objXml.ResponseBody

Set objXml = Nothing
Thanks for the help.

cross posted at microsoft.public.scripting.vbscript

Jul 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Wayno | last post by:
My php logs are coming up empty. I have done all I can think of, and all that made sense to me. Can someone take a look at my php.ini please and tell me what you think may be the problem. I...
3
by: tornado | last post by:
Hi all, I am pretty new to PHP. I was reading PHP manual and trying out the example from 2nd chapter (A simple Tutorial). When i try to print the variable as given in the example it returns...
7
by: Dan | last post by:
I was trying to troubleshoot a login page that doesn't work - it keeps saying the login/password is missing - when my tracing discovered this peculiar behavior. register_globals is off, so at...
6
by: Chris Connett | last post by:
I have an interesting problem with eval(). ---Background Info--- The program I'm working on launches a separate process with a popen to do some highly specialized processing of input, then this...
17
by: AMC | last post by:
Hi, I'm using an include file to store the connection string to a database. Whenever I try to reference that string to open a connection in the page that includes the file I get the error 'empy...
4
by: Karthick S. | last post by:
Hi, fgets returns NULL on error and the first argument on success. I want to open a file and read it using fgets. This is returning NULL, when the file is empty. Is there anyway to circumvent...
19
by: wetherbean | last post by:
Hi group..I am writing a playlist management protocol where I have a file that holds all the playlists and a file that holds all the songs....before a playlist is created I need to check to see if...
32
by: Olivier | last post by:
Dear all, I thought the code ----------------------------- pt_fichier_probleme = fopen(nom_fichier, "w"); if(pt_fichier_probleme == NULL){ message_warning_s ("Erreur l'ouverture du...
8
by: J-P-W | last post by:
Hi, anyone got any thoughts on this problem? I have sales reps. that remotely send their data to an ftp server. The office downloads all files, the code creates an empty file, then downloads the...
1
by: alain MONTMORY | last post by:
Hello everybody, I am a newbie to python so I hope I am at the right place to expose my problem..... :-http://www.python.org/doc/2.4.2/ext/pure-embedding.html 5.3 Pure Embedding I download the...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.