473,378 Members | 1,369 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Error in adoStream.Read()

Hi, all,

There is a problem that during download file, if the file size is greater than 800kb, 500 error popup. But it is OK, if the file is less than 800kb.

Can anyone give me a advice? Thanks in advance.

The asp runs on II6, windows 2003 and AspBufferingLimit in windows\system32\inetsrv\metabase.xml has been updated to 20480000.

Here's the asp script:
Expand|Select|Wrap|Line Numbers
  1. if request.querystring("loadType") = "FILE" then
  2.         'Upload.SendBinary resultFilePath,True,rs("PMEVR_TYPE"),False
  3.             'Response.ContentType = "application/x-unknown" ' arbitrary
  4.             Response.ContentType = "application/pdf" ' arbitrary
  5.             'Response.AddHeader "Content-Disposition", "attachment; filename="  & rs("PMEVR_PM_FILPTR")    
  6.             Set adoStream = CreateObject("ADODB.Stream") 
  7.         adoStream.Open() 
  8.         adoStream.Type = 1 
  9.         adoStream.LoadFromFile(resultFilePath) 
  10.         Response.BinaryWrite adoStream.Read() 
  11.         adoStream.Close 
  12.         Set adoStream = Nothing 
  13.         Response.End 
  14. end if
  15.  
regards,
JY
Dec 24 '09 #1
1 2231
jhardman
3,406 Expert 2GB
you could try turning the response buffer off completely, not sure if that will help or not. Try linking to the file directly in a static page, if you have the same issue then the problem is in IIS, if not then it is an ASP issue.

Jared
Dec 28 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Vince C. | last post by:
Hi. I'm trying to put upload results from an HTML form into an ADO stream. I thought I could code the following (JavaScript): var s = Server.CreateObject("ADODB.Stream"); s.Type =...
0
by: Morten Gulbrandsen | last post by:
mysql> USE company; Database changed mysql> mysql> DROP TABLE IF EXISTS EMPLOYEE; -------------- DROP TABLE IF EXISTS EMPLOYEE -------------- Query OK, 0 rows affected (0.00 sec)
4
by: Bill Cohagan | last post by:
I'm writing a console app in c# and am encountering a strange problem. I'm trying to use redirection of the standard input stream to read input from a (xml) file. The following code snippet is from...
8
by: Ben | last post by:
Hello, I have an asp routine to display an Excel worksheet on an a web (asp) page. I have created aspx pages but only in the classroom. Point - I have the basics for aspx. Could someone show...
2
by: dasilva109 | last post by:
Hi guys I am new to C++ and need urgent help with this part of my code for a uni coursework I have to submit by Thursday //ClientData.h #ifndef CLIENTDATA_H #define CLIENTDATA_H #include...
7
by: iporter | last post by:
I use the code below to authorise the download of certain files. Thus, instead of linking to the file in a wwwroot directory, I link to this code with the filename as a parameter, and the script...
17
by: mansb2002 | last post by:
Hi, We recently moved our webserver from Win2K to Win2003. The application works fine. Only problem is that when user views a report as a PDF, IE does not show it. The following code is used to...
0
by: .nLL | last post by:
Erorr is --------------------- Microsoft VBScript runtime error '800a0046' Permission denied /a.asp, line 3 -----------------------
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.