Current location: Hot Scripts Forums » Programming Languages » ASP » problem with downloading zip-files from webserver ;-)


problem with downloading zip-files from webserver ;-)

Reply
  #1 (permalink)  
Old 03-11-06, 09:37 AM
vincentmultimedia vincentmultimedia is offline
New Member
 
Join Date: Mar 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
problem with downloading zip-files from webserver ;-)

hi to all,

i have the following problem:
working on a "downlad-module" within a larger website, i tried several methods for downloading-files to the user.
mabye some basic infos first:
the website runs on win server 2003, using sql server 2000-database; pages are written in classic asp.
the idea behind is, that all possible download-files (flyers, brochures, some it-stuff.. means pdf, docs, exe, zip-files.. "standard-mixed-stuff, i would say) are of course stored outside the website-root and are uploaded using a cms.
for each file, the information is stored in a database (not the file itself). beside path and filename, also content-type, descriptiton, user-restrictions etc.

within the page, the user will than receive a list of possible download files.
by clicking on the link, i redirect to a "download.asp"-page, where i just want to start the download by sending the file to the user.
so far - so bad :-)

i tried 2 free components (TabsUpload; aspSmartUpload)and also a simple response.BinaryWrite
and here´s the problem: everything works fine, as long as i am messing round with other file formats than ZIP (!)
i can use the system for downloading pdfs, exe, docs... but when i want to dl a zip-file, the system "hangs up" (only the browser wants to connect endlessly.. its not a crash, because i can stop it by using ESC-key)

one interesting thing:
when i use the the BinaryWrite-method, a file is downloaded - but of course not the zip file - it is a html-page with the wrong content-type ;-)
using a text/hex-editor, you can find this error message:
Response Buffer Limit Exceeded

possible solution for this would normaly be, to turn
Response.Buffer = False
but, for using either binaryWrite or one of the components, Response.Buffer should be set to True, as far as i know...

so anyway, here is the source-code:

Code:
<%@ LANGUAGE=VBscript%>
<% OPTION EXPLICIT %>
<% Response.Buffer = True %>
<!--#include file="../include/config.inc.asp" -->
<!--#include file="../include/secure.inc.asp" -->

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
	<!--#include file="../include/head.inc.asp" -->
</head>
</body>
</html>

<%

'get uid for download
	dim uid
	uid = replace(request("file"),"'","")
	if uid = "" then response.redirect "download.asp?error=1" 'no uid

get some information, like filnema and filpath form the database
'[.... cutted of  ...]


Response.Clear
Response.Expires = 0

Dim mySmartUpload
Set mySmartUpload = Server.CreateObject("aspSmartUpload.SmartUpload")

'this one is working fine:
'Call mySmartUpload.DownloadFile("e:\Inetpub\wwwroot\file_to_download.pdf","application/x-zip-compressed","myfile.pdf")

'having only problems with this stuff:
Call mySmartUpload.DownloadFile("e:\Inetpub\wwwroot\file_to_download.zip","application/x-zip-compressed","myfile.zip")

%>

the file sizes of the demo-downloads is something betwenn 1 und 5 MBytes; some original files could exceed up to max. 250 MByte (xpress-layout for coustomers)

any ideas?
can you help me on this?

thanks in advance
juergen
Reply With Quote
  #2 (permalink)  
Old 03-22-06, 05:16 AM
Phoenix_Riser Phoenix_Riser is offline
Newbie Coder
 
Join Date: Mar 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Can I suggest trying PDF?
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Downloading files alane JavaScript 1 07-24-05 01:32 PM
Downloading files alane PHP 1 07-24-05 01:22 AM
How to make condition(20 posts in forum, one file per one day) for downloading files? renatik PHP 2 01-06-05 03:53 PM
Upload Script Problem!!! seanknighton Perl 0 03-21-04 09:54 PM
Problem in downloading the file Narang ASP 0 02-19-04 11:27 AM


All times are GMT -5. The time now is 03:42 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.