社区
ASP
帖子详情
Win2003 Server操作系统下,upfile_5xSoft上传大于200K文件时的问题
BlueLoves
2003-10-15 10:53:46
用upfile_5xSoft上传时(它是用的Request.Binaryread),
在Win2000Server下没问题,可以传大于3M以上的文件。但是在Win2003下,连300K以上的文件都上传失败。
upfile_5xSoft_Stream.write Request.BinaryRead(Request.TotalBytes)
语句出错,
请问如何解决?
...全文
125
7
打赏
收藏
Win2003 Server操作系统下,upfile_5xSoft上传大于200K文件时的问题
用upfile_5xSoft上传时(它是用的Request.Binaryread), 在Win2000Server下没问题,可以传大于3M以上的文件。但是在Win2003下,连300K以上的文件都上传失败。 upfile_5xSoft_Stream.write Request.BinaryRead(Request.TotalBytes) 语句出错, 请问如何解决?
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
7 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
gugh
2003-10-27
打赏
举报
回复
为什么我的改不了,显示为只读文件,不能修改,我从其它操作系统进去修改后,重启后又变回原来的,郁闷!
BlueLoves
2003-10-15
打赏
举报
回复
谢谢各位,Win2003下,修改IIS的配置文件即可.
问题解决了!!!!!
解决方法:
1。在\WINDOWS\system32\inetsrv 找到MetaBase.xml
2。查找字符串AspMaxRequestEntityAllowed,它的缺省值为204800(200K),也就是为什么Request.BinaryRead()不能读大于200K文件的原因了!
3。将该值改为你所需要的最大字节数。
4。一切OK!
pimple
2003-10-15
打赏
举报
回复
上传组件的一个属性.
BlueLoves
2003-10-15
打赏
举报
回复
请问
FileMaxSize是什么东西?哪个对象的属性,还是IIS的某个配置项?
水母在发光
2003-10-15
打赏
举报
回复
FileMaxSize=字节数
BlueLoves
2003-10-15
打赏
举报
回复
请详细一点好吗?具体怎么配置IIS6呢?
yidewang
2003-10-15
打赏
举报
回复
应该配置一下iis6的设置文件
鲜花网站建设
鲜花店
无组件ASP
文件
上传
源代码
无组件ASP
文件
上传
源代码 记得在建立一个
文件
夹"updata" saveannounce_upload.asp
上传
页 ------------------------------------ body {font-size:9pt;} input {font-size:9pt;}
文件
上传
文件
------------------------------------ saveannouce_up
file
.asp 保存
文件
到服务器 ------------------------------------
文件
上传
<% dim upload,
file
,formName,formPath set upload=new upload_
5xSoft
''建立
上传
对象 formPath=upload.form("
file
path") ''在目录后加(/) if right(formPath,1)"/" then formPath=formPath&"/" for each formName in upload.
file
''列出所有
上传
了的
文件
set
file
=upload.
file
(formName) ''生成一个
文件
对象 if
file
.
file
size<100 then response.write "请先选择你要
上传
的
文件
[ 重新
上传
]" response.end end if if
file
.
file
size>500*1000 then '设置
上传
文件
大小为500K response.write "
文件
大小超过了限制 500K [ 重新
上传
]" response.end end if if
file
.
File
Size>0 then ''如果
File
Size > 0 说明有
文件
数据
file
.SaveAs
Server
.mappath("updata\"&
file
.
File
Name) ''保存
文件
end if set
file
=nothing next set upload=nothing response.write "
文件
上传
成功 [ 继续
上传
]" %> ------------------------------------ upload.inc 建立upload对象 ------------------------------------ dim up
file
_
5xSoft
_Stream Class upload_
5xSoft
dim Form,
File
,Version Private Sub Class_Initialize dim iStart,i
File
NameStart,i
File
NameEnd,iEnd,vbEnter,iFormStart,iFormEnd,the
File
dim strDiv,mFormName,mFormValue,m
File
Name,m
File
Size,m
File
Path,iDivLen,mStr Version="" if Request.TotalBytes<1 then Exit Sub set Form=CreateObject("Scripting.Dictionary") set
File
=CreateObject("Scripting.Dictionary") set up
file
_
5xSoft
_Stream=CreateObject("Adodb.Stream") up
file
_
5xSoft
_Stream.mode=3 up
file
_
5xSoft
_Stream.type=1 up
file
_
5xSoft
_Stream.open up
file
_
5xSoft
_Stream.write Request.BinaryRead(Request.TotalBytes) vbEnter=Chr(13)&Chr(10) iDivLen=inString(1,vbEnter)+1 strDiv=subString(1,iDivLen) iFormStart=iDivLen iFormEnd=inString(iformStart,strDiv)-1 while iFormStart 0 and i
File
NameStartiStart then m
File
Size=iEnd-iStart-4 else m
File
Size=0 end if set the
File
=new
File
Info the
File
.
File
Name=get
File
Name(m
File
Name) the
File
.
File
Path=get
File
Path(m
File
Name) the
File
.
File
Size=m
File
Size the
File
.
File
Start=iStart+4 the
File
.FormName=FormName
file
.add mFormName,the
File
else iStart=inString(iEnd+1,vbEnter&vbEnter) iEnd=inString(iStart+4,vbEnter&strDiv) if iEnd>iStart then mFormValue=subString(iStart+4,iEnd-iStart-4) else mFormValue="" end if form.Add mFormName,mFormValue end if iFormStart=iformEnd+iDivLen iFormEnd=inString(iformStart,strDiv)-1 wend End Sub Private Function subString(theStart,theLen) dim i,c,stemp up
file
_
5xSoft
_Stream.Position=theStart-1 stemp="" for i=1 to theLen if up
file
_
5xSoft
_Stream.EOS then Exit for c=ascB(up
file
_
5xSoft
_Stream.Read(1)) If c > 127 Then if up
file
_
5xSoft
_Stream.EOS then Exit for stemp=stemp&Chr(AscW(ChrB(AscB(up
file
_
5xSoft
_Stream.Read(1)))&ChrB(c))) i=i+1 else stemp=stemp&Chr(c) End If Next subString=stemp End function Private Function inString(theStart,varStr) dim i,j,bt,theLen,str InString=0 Str=toByte(varStr) theLen=LenB(Str) for i=theStart to up
file
_
5xSoft
_Stream.Size-theLen if i>up
file
_
5xSoft
_Stream.size then exit Function up
file
_
5xSoft
_Stream.Position=i-1 if AscB(up
file
_
5xSoft
_Stream.Read(1))=AscB(midB(Str,1)) then InString=i for j=2 to theLen if up
file
_
5xSoft
_Stream.EOS then inString=0 Exit for end if if AscB(up
file
_
5xSoft
_Stream.Read(1))AscB(MidB(Str,j,1)) then InString=0 Exit For end if next if InString0 then Exit Function end if next End Function Private Sub Class_Terminate form.RemoveAll
file
.RemoveAll set form=nothing set
file
=nothing up
file
_
5xSoft
_Stream.close set up
file
_
5xSoft
_Stream=nothing End Sub Private function Get
File
Path(FullPath) If FullPath "" Then Get
File
Path = left(FullPath,InStrRev(FullPath, "\")) Else Get
File
Path = "" End If End function Private function Get
File
Name(FullPath) If FullPath "" Then Get
File
Name = mid(FullPath,InStrRev(FullPath, "\")+1) Else Get
File
Name = "" End If End function Private function toByte(Str) dim i,iCode,c,iLow,iHigh toByte="" For i=1 To Len(Str) c=mid(Str,i,1) iCode =Asc(c) If iCode255 Then iLow = Left(Hex(Asc(c)),2) iHigh =Right(Hex(Asc(c)),2) toByte = toByte & chrB("&H"&iLow) & chrB("&H"&iHigh) Else toByte = toByte & chrB(AscB(c)) End If Next End function End Class Class
File
Info dim FormName,
File
Name,
File
Path,
File
Size,
File
Start Private Sub Class_Initialize
File
Name = ""
File
Path = ""
File
Size = 0
File
Start= 0 FormName = "" End Sub Public function SaveAs(FullPath) dim dr,ErrorChar,i SaveAs=1 if trim(fullpath)="" or
File
Size=0 or
File
Start=0 or
File
Name="" then exit function if
File
Start=0 or right(fullpath,1)="/" then exit function set dr=CreateObject("Adodb.Stream") dr.Mode=3 dr.Type=1 dr.Open up
file
_
5xSoft
_Stream.position=
File
Start-1 up
file
_
5xSoft
_Stream.copyto dr,
File
Size dr.SaveTo
File
FullPath,2 dr.Close set dr=nothing SaveAs=0 end function End Class
TsysV1.1 系统
文件
清单介绍
一、 介绍: 本文档仅适用于 Tsys V1.1 正式版 本文档主要方便开发者对Tsys
文件
的整体功能模块有个大致了解,不包括细节代码的介绍。欢迎热心的网友们加入到文档的完善工作中。 二、
文件
列表:
文件
功能 备注 TsysManage
File
System Up
File
_Iframe.asp
上传
文件
表单页面 Up
File
_Save
File
.asp 保存
上传
的
文件
upload_
5xsoft
.asp
5xsoft
无组件
上传
View.asp
上传
的
文件
列表页面 TsysManageInclude CfsEnCode.asp 加密函数 现用于管理员密码加密 ClassList_Fun
蓝色企业网站源码ASP+Access数据库带完整后台
1:本网站源码采用ASP+Access数据库开发,适合中小企业网站建设。 2:本网站源码后台功能强大,主要功能有:企业信息管理、产品管理、下载中心管理、新闻管理、留言管理、荣誉管理、人才管理、友情链接管理。 3:本网站源码首页中的LOGO图片和导航栏图片均自带PSD源
文件
,方便修改。 4:本网站源码可防止SQL漏洞攻击。 5:本网站源码采用天蓝色界面,美观大方。 演示地址:http://changke18.web-07.com/
C# webservice大
文件
传输实例源码
下载后会有2个
文件
一个 Up
File
模拟
上传
客户端, Web
Server
模拟服务器接收端。 环境是VS2010.
ASP
28,391
社区成员
357,060
社区内容
发帖
与我相关
我的任务
ASP
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
复制链接
扫一扫
分享
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章