Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Community Discussions (All other subjects)
 windows 2003 server and downloads..
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 4

weeweeslap
Senior Member

USA
1077 Posts

Posted - 27 January 2007 :  17:34:41  Show Profile  Visit weeweeslap's Homepage  Send weeweeslap an AOL message  Send weeweeslap a Yahoo! Message
wow, your first link fixed it. I would never have thought of gfoogling something like aspbuffering, thanks again! I increased it to 150 mb size as we have vids up around there. Thanks again, will check out the ftp though I have not had problems with that yet.

coaster crazy
Go to Top of Page

pdrg
Support Moderator

United Kingdom
2897 Posts

Posted - 27 January 2007 :  17:46:20  Show Profile  Send pdrg a Yahoo! Message
woohoo!! What a lucky hunch the filesize thing was - when I saw you had a limit of what was almost certainly 4Meg in that range, I thought I'd just hit google and got darn lucky very quickly :)

Really pleased you're sorted

Paddy :)
Go to Top of Page

weeweeslap
Senior Member

USA
1077 Posts

Posted - 25 March 2007 :  23:16:38  Show Profile  Visit weeweeslap's Homepage  Send weeweeslap an AOL message  Send weeweeslap a Yahoo! Message
hmm I am back at step one
I got the same code that worked before

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

metabase.xml is edited should with AspBufferingLimit = 175000000
which is muchmore than enough than what we download.
The problem now is if I link directly the file downloads fine, if I stream it through the download page then it doesn't work. Ideas?

coaster crazy
Go to Top of Page

weeweeslap
Senior Member

USA
1077 Posts

Posted - 25 March 2007 :  23:18:27  Show Profile  Visit weeweeslap's Homepage  Send weeweeslap an AOL message  Send weeweeslap a Yahoo! Message
me and my thoughtfulness... I switched back to the old code

      Response.Redirect("upload/" & strDBFileName)

and now that works fine so I guess no problems to report. But the real question, why did it stop working with the new code and all of a sudden, for no reason, no IIS changes, the old code works fine now?

coaster crazy
Go to Top of Page

weeweeslap
Senior Member

USA
1077 Posts

Posted - 28 March 2007 :  01:51:55  Show Profile  Visit weeweeslap's Homepage  Send weeweeslap an AOL message  Send weeweeslap a Yahoo! Message
ok sorry again for the old topic. Here's the situation which I can't figure out.
I have various file extensions that are downloaded on a daily basis. When I encountered the error listed two posts above, I switched the code to what it is one post above. Everything downloads fine except files that have the extension .nlpack
I was wondering if there is some if and then statement that I can use to check the file extension first and if it meets the criteria use this form of download code else if it meets this other file extension use this other kind of download code? I would very much appreciate your help!
Thank you.

coaster crazy
Go to Top of Page

pdrg
Support Moderator

United Kingdom
2897 Posts

Posted - 30 March 2007 :  09:48:53  Show Profile  Send pdrg a Yahoo! Message
pseudocode:

select case rsearch(myfilename,".")
case "nlpack"
<some code>
case else
<some different code>
end case

OK, so rsearch() isn't a valid function, but there's something similar I'm sure.
Go to Top of Page

weeweeslap
Senior Member

USA
1077 Posts

Posted - 02 January 2008 :  21:48:26  Show Profile  Visit weeweeslap's Homepage  Send weeweeslap an AOL message  Send weeweeslap a Yahoo! Message
Hi, sorry for the old topic, but I changed on the same server, the domain name. changed from http://www.weeweeslap.com to http://www.coastercrazy.com I changed all paths to what they should be and now any .nltrack or .nlpack files download as a total file size of 0. The files on the server are the right size and downloading through ftp works good. I checked metabase.xml for any changes and all is as it should be. Any ideas what might be going on. I am stumped! Please help me

coaster crazy
Go to Top of Page

weeweeslap
Senior Member

USA
1077 Posts

Posted - 03 January 2008 :  14:51:46  Show Profile  Visit weeweeslap's Homepage  Send weeweeslap an AOL message  Send weeweeslap a Yahoo! Message
Here's a copy of download.asp in txt format
http://www.coastercrazy.com/track_exchange/download.txt
I am going nuts here. Can someone help? Maybe you need server access? Please help Thank you.

coaster crazy
Go to Top of Page

pdrg
Support Moderator

United Kingdom
2897 Posts

Posted - 03 January 2008 :  16:12:39  Show Profile  Send pdrg a Yahoo! Message
Not sure if it's related but...the following code doesn't make sense - right hand 4 characters of file name -
.zip (nothing happens - no contenttype set)
.smpark (??! the right hand 4 characters will never match a 7-character string)
so ContentType will ALWAYS be "application/octet-stream"

strFileType = lcase(Right(strFileName, 4))
Select Case strFileType
Case ".zip"
Case ".smpark"
ContentType = "application/zip"
Case Else
'Handle All Other Files
ContentType = "application/octet-stream"
End Select
Go to Top of Page

weeweeslap
Senior Member

USA
1077 Posts

Posted - 03 January 2008 :  16:25:40  Show Profile  Visit weeweeslap's Homepage  Send weeweeslap an AOL message  Send weeweeslap a Yahoo! Message
oh, the file has not been changed and was working fine until we changed domain names. So how would I change it to look everything from the up to the .? should I make something like
strFileType = lcase(Right(strFileName, 4))
Select Case strFileType
Case ".zip"
strFileType = lcase(Right(strFileName, 7))
Case ".smpark"
strFileType = lcase(Right(strFileName, 7))
Case ".nlpack"
ContentType = "application/zip"
Case Else
'Handle All Other Files
ContentType = "application/octet-stream"
End Select

Would something like that work?

coaster crazy
Go to Top of Page

pdrg
Support Moderator

United Kingdom
2897 Posts

Posted - 04 January 2008 :  11:35:55  Show Profile  Send pdrg a Yahoo! Message
As for why the downloads aren't working, it's a bit of a mystery if it's just the domain name changed - are you sure the new domain maps to the same path and everything? You haven't got the old domain hard coded anywhere have you? Most odd...

As for the code - if instrrev is a supported function (really I'm so rusty) then something like the following is much more elegant - I think it must have worked in the past through good luck and the robustness of the engine as much as anything! You'll want to check the instrrev (or equivelent function) syntax, and that the whole function is returning the "." too. Also check the select case syntax for multiple options on one line - I think it's commas separating as shown below.

strFileType = lcase(Right(strFileName, instrrev(strFileName, "."))) <--something like this, if instrrev is supported!
Select Case strFileType
Case ".zip", ".smpark", ".nlpack"
ContentType = "application/zip"
Case Else 'Handle All Other Files
ContentType = "application/octet-stream"
End Select
Go to Top of Page

weeweeslap
Senior Member

USA
1077 Posts

Posted - 05 January 2008 :  12:41:23  Show Profile  Visit weeweeslap's Homepage  Send weeweeslap an AOL message  Send weeweeslap a Yahoo! Message
I just tried that and the end result is that it downloads it and the file size is 0 and the file doesn't work but the file on the server is the right file size

coaster crazy

Edited by - weeweeslap on 07 January 2008 15:54:38
Go to Top of Page

weeweeslap
Senior Member

USA
1077 Posts

Posted - 07 January 2008 :  15:54:56  Show Profile  Visit weeweeslap's Homepage  Send weeweeslap an AOL message  Send weeweeslap a Yahoo! Message
bump

coaster crazy
Go to Top of Page

pdrg
Support Moderator

United Kingdom
2897 Posts

Posted - 07 January 2008 :  16:21:07  Show Profile  Send pdrg a Yahoo! Message
Yeah, I only come on here a few times a week, apologies.

As for why it downloads with size 0 frankly I can't think, anyone else got any ideas why a domain name change would do this?
Go to Top of Page

weeweeslap
Senior Member

USA
1077 Posts

Posted - 10 January 2008 :  00:37:36  Show Profile  Visit weeweeslap's Homepage  Send weeweeslap an AOL message  Send weeweeslap a Yahoo! Message
ok I downloaded one of the known working files on the server that wont download properly.
I renamed it to 1234 and uploade dit via our uploader. I went and then downloaded that file and it downloaded fine. Now, only thing that can be causing the download problems is the file name lenght:
this one downloads fine: http://www.coastercrazy.com/track_exchange/detail.asp?tid=13423

this is the original file, only difference is the file name but it downloads as 0 kb instead of it's true file size as the one above downloads: http://www.coastercrazy.com/track_exchange/detail.asp?tid=10928

also if you pay attention to the downloaded window in IE where you can chose a different name to download, the little window behind says 101% Downloaded on the non functioning file while it says 0% downloaded on the working file. SO is this an issue on the file naming? If so, what can I change on the server so downloads work with longer file names?
Thank you.

Feel free to login and test those two download links:
username: SnitzTest
password: test

coaster crazy

Edited by - weeweeslap on 10 January 2008 00:38:30
Go to Top of Page
Page: of 4 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.21 seconds. Powered By: Snitz Forums 2000 Version 3.4.07