有,这个我为我的框架底层写的,你参考一下 ChunkSize = 2*1024*1024 这里就是第一每次请求最快下载速度,我限制是2M 你可以能的更小,就是你带宽不管有多大都可以用asp来控制下载的速度,下面的循环判断 就可以判读下载大小了
转载说明出处啊 ,呵呵

程序代码:
'函数格式 Download(StrFile,NewName)
'功能描述 下载一个已经存的的文件,处理中文不能下载的问题
'应用代码 By HT.Liu
Public FunctIon Download(StrFile,NewName)
Dim StrFIlename,ALLOW_FILE_EXT,FileExt,Fso,IntFIlelength,Upload,S,TotalSize,offset,f,ChunkSize,strChunk
StrFIlename = Server.MapPath(strFile)
ALLOW_FILE_EXT = ",ASP,ASA,ASPX,ASAX,MDB,PHP,JSP,SHTML,HTML,HTM,TV,DATA,Config,INI,VBS,JS,"
FileExt=MId(StrFIlename,InStrRev(StrFIleName, ".")+1)
Response.Buffer=True
Response.Clear
If InStr("," & ALLOW_FILE_EXT & ",", "," & FileExt & ",") > 0 Then
Download = "不允许下载此文件格式."
Exit Function
End If
Set Fso=Server.CreateObject("ScrIptIng.FIleSystemObJect")
If Not Fso.FIleExists(StrFIleName) Then
Download = "下载的文件不存在."
Exit Function
End If
Set F=Fso.GetFIle(StrFIlename)
IntFIlelength=F.SIze
If Err Then
Download = "该文件数据不完整或许已损坏."
Exit Function
End If
Set S=Server.CreateObject("ADODB.Stream")
S.Type = 1
S.Open
'Response.write StrFIlename
'Response.end
s.LoadFromFIle(StrFIlename)
TotalSize = S.Size
Response.ContentType = "application/x-download; charset=UTF-8"
'Response.ContentType = "application/x-download"
Response.AddHeader "Content-DIsposItIon","attachment; filename="&NewName
Response.AddHeader "Content-Length",IntFilelength
offset = 0
'定义每次请求的下载流字节
ChunkSize = 2*1024*1024
While offset < TotalSize
If (TotalSize - offset < ChunkSize) Then
ChunkSize = TotalSize - offset
End If
strChunk = S.Read(ChunkSize)
'Response.write strChunk
Response.BinaryWrite strChunk
Response.Flush
offset = offset + ChunkSize
Wend
S.Close
Set S = NothIng
Set Fso = Nothing
Call Log_Write("下载文件:"&StrFIlename&"=>"&NewName)
End FunctIon
[
本帖最后由 coretear 于 2012-7-17 19:57 编辑 ]