port_blair2001
asked on
Uploading file to web server using ASP
Request.Binaryread throws error- 007~ASP 0101~Unexpected error~The function returned |. I tried different approaches but it always fails in binary read method, it seems system is not able to handle the memory allocation, I dont see any size restrictions in the binaryread documentation. I am able to upload the file 65 mb just fine. I changed the metabase.xml to upload up to 2 gig, its windows 2003 server
If I directly write request.totalbytes to log file the byte count is correct
when i do this binread = request.TotalBytes the number of bytes in binread is incorrect
its fails here - ado_stream.Write request.BinaryRead(request .TotalByte s)
Please help..I am just cant figure out waht going wrong
If I directly write request.totalbytes to log file the byte count is correct
when i do this binread = request.TotalBytes the number of bytes in binread is incorrect
its fails here - ado_stream.Write request.BinaryRead(request
Please help..I am just cant figure out waht going wrong
lets see your code. can u post it here ?
ASKER
requestFname = request.querystring("fname ")
set ado_stream = Server.CreateObject("ADODB .Stream")
ado_stream.Type = 1 ' 1=adTypeBinary
ado_stream.open
ado_stream.Write request.BinaryRead(request .TotalByte s) - It fails here
ado_stream.SaveToFile server.MapPath("\Temp\cach e\") & "\" & requestFname ,2
ado_stream.close
set ado_stream = Nothing
set ado_stream = Server.CreateObject("ADODB
ado_stream.Type = 1 ' 1=adTypeBinary
ado_stream.open
ado_stream.Write request.BinaryRead(request
ado_stream.SaveToFile server.MapPath("\Temp\cach
ado_stream.close
set ado_stream = Nothing
ado_stream.SaveToFile server.MapPath("\Temp\cach e\") & "\" & requestFname ,2
did u try to change it to :
ado_stream.SaveToFile server.MapPath("\Temp\cach e\") & requestFname ,2
did u try to change it to :
ado_stream.SaveToFile server.MapPath("\Temp\cach
ASKER
Yes, sorry it was a typo
but wats the outcome ? still have same problem or it is fixed ?
ASKER
still have the same problem
why dont you post your full code ?
or just try free script from
http://www.asp101.com/articles/jacob/scriptupload.asp
or just try free script from
http://www.asp101.com/articles/jacob/scriptupload.asp
ASKER
I tried ur suggestion but stlll the same error mesage 007~ASP 0101~Unexpected error~The function errored out at reuqest.binaryread
ASKER
anybody with ideas please
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.