Home > front end >  Request object error 'ASP, 0101:80004005' accidental error upfile. ASP, line 130 function
Request object error 'ASP, 0101:80004005' accidental error upfile. ASP, line 130 function

Time:04-21

Have modified the IIS upload restrictions for AspMaxRequestEntityAllowed="2048000000", the website can upload 60 m attachment, upload above 70 m, will prompt the above error, great god help solve the trouble,,, such as settled, I will surely ChongXie,
 & lt; % 
Select a case request (" action ")
Case "PIC" :
Call the PIC ()
End the select
Sub PIC ()
If the Request. The QueryString (" submit ")="PIC" then
Uploadpath="../upload/"
Uploadsize="2048000"
Uploadtype="JPG/GIF/PDF/doc/docx XLSX/PPTX/XLS/rar/zip/"
The Set yecaorequest=new UpLoadClass
Yecaorequest. SavePath=uploadpath
Yecaorequest. MaxSize=uploadsize * 1024
Yecaorequest. FileType=uploadtype
AutoSave=true
Yecaorequest. Open
If yecaorequest. Form (" file_Err ") & lt;> 0 then
The select case yecaorequest. Form (" file_Err ")
Case 1: STR="& lt; Font color=red> Upload not success! File more than "& amp; Uploadsize&" K [& lt; a href="javascript: history. The go (1) '& gt; to upload & lt;/a>]

"
Case 2: STR="& lt; Font color=red> Upload not success! File format is not right [& lt; a href="javascript: history. The go (1) '] & gt; To upload & lt;/a> ]

"
Case 3: STR="& lt; Font color=red> Upload not success! File format is too big and not [& lt; a href="javascript: history. The go (1) '& gt; to upload & lt;/a>]

"
End the select
Response. Write the STR
The else
Response. Write "& lt; Script language="javascript" "& gt; The parent. Form1. File1. Value='" & amp; Yecaorequest. SavePath& Yecaorequest. Form (" file ") & amp;" ';"
Response. Write "& lt;/script>"
Response. Write "& lt; Script language="javascript" "& gt; The parent. Form1. File1. Value='" & amp; Yecaorequest. SavePath& Yecaorequest. Form (" file ") & amp;" ';"
Response. Write "& lt;/script>"
Response. Write "& lt;/script>"
Size=round ((yecaorequest Form (" file_size ")/1024), 2) & amp;" K
"Response. Write "& lt; Font color=red> File upload success & lt;/font>

"
End the if
The Set yecaorequest=nothing
End the if
Response. Write "& lt; The form name=form action=? Action=pic& Submit PIC method of==post enctype=multipart/form - data>"
Response. Write "& lt; Input type=file name=file style="" border: 1 solid # 000000; Background: # FFFFFF "" & gt; & Have spent"
Response. Write "& lt; Input type=submit name=submit value=https://bbs.csdn.net/topics/upload put "" onm ouseover=" "enclosing the className='overput'" "onmouseout=" "enclosing the className='put'" "& gt;"
Response. Write "& lt;/form>"
End sub

% & gt;
<%
The Class UpLoadClass

Private p_MaxSize p_FileType, p_SavePath p_AutoSave, p_Error
Private objForm binForm, binItem, strDate lngTime
Public FormItem, FileItem

The Public Property of the Get Version
Version="Rumor UpLoadClass Version 2.0"
End Property

Public Property Get Error
Error=p_Error
End Property

Public Property Get MaxSize
MaxSize=p_MaxSize
End Property
Public Property Let MaxSize (lngSize)
If isNumeric (lngSize) then
P_MaxSize=CLNG (lngSize)
End the if
End Property

Public Property Get FileType
FileType=p_FileType
End Property
Public Property Let FileType (strType)
P_FileType=strType
End Property

Public Property Get SavePath
SavePath=p_SavePath
End Property
Public Property Let SavePath (strPath)
P_SavePath=replace (strPath, CRH (0), "")
End Property

Public Property Get AutoSave
AutoSave=p_AutoSave
End Property
Public Property Let AutoSave (byVal Flag)
The select case Flag
Case 0:
Case 1:
Case 2:
Case false: Flag=2
In case the else: Flag=0
End the select
P_AutoSave=Flag
End Property

Private Sub Class_Initialize
P_Error=1
P_MaxSize=2048000
P_FileType="JPG/GIF"
P_SavePath=""
P_AutoSave=0
StrDate=replace (CSTR (Date ()), "-", "")
StrDate=replace (strDate, "/", "")
LngTime=CLNG (timer () * 1000)
The Set binForm=Server. CreateObject (" ADODB. Stream ")
The Set binItem=Server. CreateObject (" ADODB. Stream ")
The Set objForm=Server. CreateObject (" Scripting. The Dictionary ")
ObjForm.Com pareMode=1
End Sub

Private Sub Class_Terminate
ObjForm. RemoveAll
The Set objForm=nothing
The Set binItem=nothing
BinForm. Close ()
The Set binForm=nothing
End Sub

Public Sub Open ()
If p_Error=1 then
P_Error=0
The else
The Exit Sub
End the if
Dim lngRequestSize binRequestData, strFormItem, strFileItem
Const strSplit="'" "& gt;"
LngRequestSize=Request. TotalBytes
If lngRequestSize<1 then
P_Error=4
The Exit Sub
End the if
binRequestData=https://bbs.csdn.net/topics/Request.BinaryRead (lngRequestSize)
BinForm. Type=1
BinForm. Open
BinForm. Write binRequestData

Dim bCrLf strSeparator, intSeparator
BCrLf=ChrB (13) & amp; ChrB (10)

IntSeparator=InstrB (1, binRequestData, bCrLf) - 1
StrSeparator=LeftB (binRequestData intSeparator)

Dim p_start p_end, strItem strInam, intTemp, strTemp
Dim strFtyp strFnam, strFext, lngFsiz
P_start=intSeparator + 2
Do
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  •  Tags:  
  • ASP
  • Related