Author |
Topic  |
weeweeslap
Senior Member
   
USA
1077 Posts |
Posted - 18 January 2007 : 02:21:06
|
I uploaded that same package( through upload component ), looked at it on the server after upload and it's the same file size (1.45 mb) and even installed the program that runs it and it ran just fine, but when I downloaded, it downloaded as 28.8kb. |
coaster crazy |
Edited by - weeweeslap on 18 January 2007 04:03:01 |
 |
|
pdrg
Support Moderator
    
United Kingdom
2897 Posts |
Posted - 18 January 2007 : 11:34:07
|
quote: Originally posted by weeweeslap
I uploaded that same package( through upload component ), looked at it on the server after upload and it's the same file size (1.45 mb) and even installed the program that runs it and it ran just fine, but when I downloaded, it downloaded as 28.8kb.
Yes, it downloads at 28.8kb - have a look at the file contents, they're
(snip)
<head>
<title>WeeWeeSlap.com</title>
<meta name="copyright" content="This Forum code is Copyright (C) 2000-02 Michael Anderson, Pierre Gorissen, Huw Reddick and Richard Kinser, Non-Forum Related code is Copyright (C) 2002-2006 WeeWeeSlap.com">
(snip)
Basically the download component is serving up a snitz file for some reason. Have you checked (in the case of http://www.weeweeslap.com/track_exchange/download.asp?tid=11316 which I clicked) that tid=11316 doesn't point to the asp file/page instead of the actual object itself? |
 |
|
pdrg
Support Moderator
    
United Kingdom
2897 Posts |
Posted - 18 January 2007 : 11:50:13
|
Interestingly, if I change the link tid=xxxxx from xxxxx=11316 to xxxxx=11315, 11314, I still get the same file back. There's something really screwy going on with your download.asp file! Is it code-identical to dayve's post at the top of this thread? |
 |
|
weeweeslap
Senior Member
   
USA
1077 Posts |
Posted - 18 January 2007 : 13:35:28
|
yes sir, in fact here's the entire content's of download.asp http://www.weeweeslap.com/track_exchange/download.txt Funny how there's no problem linking directly to download.txt... The lines of code where the download initiates is lines 100-109, line 110 is what was there and worked on windows 2000 and didn't work in 2003. Changing the number at the end of URL only tells download.asp to grab a trackfile with that identification. There's over 11,000 files to grab off the server. Thanks! |
coaster crazy |
Edited by - weeweeslap on 18 January 2007 13:36:32 |
 |
|
pdrg
Support Moderator
    
United Kingdom
2897 Posts |
Posted - 18 January 2007 : 15:05:15
|
Just ideas/questions as I've no dev tools any more, so trying to apply crazy head logic instead here...
Lines near the top somewhere...
strSql = "SELECT T_DOWNLOADED" strSql = strSql & ", T_FILE" strSql = strSql & " FROM " & strTablePrefix & "TRACKS" strSql = strSql & " WHERE T_ID=" & strQueryTrackID set rs = my_Conn.Execute (strSql)
Have you confirmed strSQL returns the correct values (throw in a response.write then comment it out once debugged)?
If so, next try taking the EXACT values from the above (with all the slashes, etc), and temporarily hard-code the strDBFileName in the section around line 100 where it seems to fubar - let's see if it still does, or if it can deliver the correct file.
If not, another response.write will give us the exact FPath you have, is it correct?
It may be that there's a problem with paths, maybe an extra or missing slash or two, maybe a missing mappath, or something. That could then be erroring the adoStream.LoadFromFile(FPath), and maybe the 404/500 actually resolves to the file that ends up downloading. Which file on your server is it that gets downloaded at the moment? the 28.8k one? Do any response.redirects point there? Does your 404/500?
Just a few thoughts and tests - it's the direction I'd go if it were my app, so it may help...
fingers crossed for you! |
 |
|
weeweeslap
Senior Member
   
USA
1077 Posts |
Posted - 18 January 2007 : 15:26:16
|
it has been fixed! Annoyed a buddy on MSN for about an hour  chatlog:
quote:
ñ#1769;#1758;#1769;ñ SEO Specialist ñ#1769;#1758;#1769;ñ says: it should work now... ñ#1769;#1758;#1769;ñ SEO Specialist ñ#1769;#1758;#1769;ñ says: I foun a few issues weeweeslap says: oh? which ones? ñ#1769;#1758;#1769;ñ SEO Specialist ñ#1769;#1758;#1769;ñ says: firstly, you were not using a filepath.... just a filename... ñ#1769;#1758;#1769;ñ SEO Specialist ñ#1769;#1758;#1769;ñ says: you needed server.mappath ñ#1769;#1758;#1769;ñ SEO Specialist ñ#1769;#1758;#1769;ñ says: secondly, your content types needs to change depending on zip, or something else... ñ#1769;#1758;#1769;ñ SEO Specialist ñ#1769;#1758;#1769;ñ says: lastly, you had a space after the %> ñ#1769;#1758;#1769;ñ SEO Specialist ñ#1769;#1758;#1769;ñ says: that one little space after your ASP block was the *** to put my finger on
now it looks like this:
Response.clear
Response.ContentType = ContentType ' arbitrary
FPath = server.mappath("./upload/" & strDBFileName)
Response.AddHeader "Content-Disposition","attachment; filename=" & strDBFileName
Set adoStream = CreateObject("ADODB.Stream")
adoStream.Open()
adoStream.Type = 1
adoStream.LoadFromFile(FPath)
Response.BinaryWrite adoStream.Read()
Response.Flush
adoStream.Close
Set adoStream = Nothing
response.end Thanks guys for your help in helping get into the right direction. I appreciate your help a lot! That's why SNitz is the best, the support is umatched  |
coaster crazy |
 |
|
pdrg
Support Moderator
    
United Kingdom
2897 Posts |
Posted - 18 January 2007 : 17:02:34
|
Yay! And I see it was a paths problem...I diagnosed that just with notepad and a coffee, and I haven't written a single line of code in 3 years...I've still got it ;-) |
 |
|
weeweeslap
Senior Member
   
USA
1077 Posts |
Posted - 18 January 2007 : 18:22:51
|
though shouldn't it have thrown a 404? windows 2003 is weird  |
coaster crazy |
 |
|
pdrg
Support Moderator
    
United Kingdom
2897 Posts |
Posted - 19 January 2007 : 09:49:58
|
Maybe it's a 500? I don't know your setup, but it looks like you're up and running, which is the main thing :) |
 |
|
weeweeslap
Senior Member
   
USA
1077 Posts |
Posted - 19 January 2007 : 12:50:03
|
Yes it is! We're up to 100% operating status so that's good. Hopefully I don't have to go through this anytime soon again, thanks  |
coaster crazy |
 |
|
weeweeslap
Senior Member
   
USA
1077 Posts |
Posted - 27 January 2007 : 14:52:15
|
ok, I hate to be a pain again but we've encountered another problem. It seems with large file downloads, example is a 4.46 megs file, when downloaded it downloads as 0 kb, it uploads fine, ran it on the server and file executed fine but if we try to download it using the code above, it fails to download. Maybe you guys can help me out once more on this? Thanks! |
coaster crazy |
 |
|
pdrg
Support Moderator
    
United Kingdom
2897 Posts |
Posted - 27 January 2007 : 15:42:47
|
debug steps 1) work out the filesize at which it fails (ie try with several files sized 2M, 2.5M, 3M, 3.5M etc) - just in case that sheds any light 2) any particular file extensions involved? Try some others. 3) are we certain all the paths and so forth from above are resolving correctly now? 4) are you certain the 0kb file isn't just a placeholder and waiting for the full file to download? 5) are the 0k files tryly empty? (use notepad or something to check)
These could help give some insight into what's going on, or throw up a useful lead later :)
hth, and good luck! |
 |
|
weeweeslap
Senior Member
   
USA
1077 Posts |
Posted - 27 January 2007 : 17:01:01
|
1) Files up to 3991 kb dl'ed fine and opened fine, any and all files over 4206 kb fail to download correctly resulting at 0kb file size and can't be opened with their associated programs. 2) Any extensions, td6, zip, nlpack, nltrack, smpark, csa etc. 3) Yes all paths are resolving correctly. 4) Yes, I am certain. 5) Opened a couple of the 0kb ones in notepad, all revealed to be 100% empty, no text, nothing in the files. |
coaster crazy |
Edited by - weeweeslap on 27 January 2007 17:01:58 |
 |
|
pdrg
Support Moderator
    
United Kingdom
2897 Posts |
|
pdrg
Support Moderator
    
United Kingdom
2897 Posts |
|
Topic  |
|