Here's the long story short.
At work we have to real-time generate a report(excel format) which involves
a number of table joining. So to export into excel contentType
'application/vnd.ms-excel' is used, and data are written as table, looping
each row of recordset data as table row.
Problem is when user hit export and attempt to open/save the file, file
would then be downloaded at constant rate. But during this time, entire
server would be irresponsive and in a hang-like state, this is expereinced by
all users. When they attmept to visit another asp page they would wait until
the page eventually timeout. This will continues until the report was
completely generated and downloaded by users.
I'm not sure if i'm explaining myself clearly here but I appreciate all the
helps I can get. Thanks.
Anthony Jones - 04 Jul 2008 07:41 GMT
> Here's the long story short.
> At work we have to real-time generate a report(excel format) which involves
[quoted text clipped - 11 lines]
> I'm not sure if i'm explaining myself clearly here but I appreciate all the
> helps I can get. Thanks.
I'm not entirely sure whether you mean that:
a) when a user downloads the spreadhsheet that user can not navigate the
site whilst the down load is in progress.
OR
b) when one user downloads the spreadsheet all users can not access the
site
If (a) then this is a limitation of ASP which can on process one script per
session at a time. The users session is currently involved in a script
generating the spreadsheet so any further requests for ASP pages will have
to be queued until the script completes.
If (b) then you have ASP Debugging turned on which means that only one
thread is used to process ASP requests hence whilst the spreadsheet script
is running no other ASP script for any user can be processed. In IIS open
the properties dialog on the application on home directory tab click
Configuration. In the Application Configuration dialog select the App
Debugging tab and unselect the Debugging flags.

Signature
Anthony Jones - MVP ASP/ASP.NET
Newbro - 04 Jul 2008 08:25 GMT
Anthony
Scenario B is exactly the situation. I followed your advice to turn off the
script debuging and Bam! All problems gone! You don't know how much times you
saved me from trying to solve this issue :) Only thing is that I thought
stuff like this should really be turn off by default. Anyway really thanks a
bunch.
> > Here's the long story short.
> > At work we have to real-time generate a report(excel format) which
[quoted text clipped - 37 lines]
> Configuration. In the Application Configuration dialog select the App
> Debugging tab and unselect the Debugging flags.
Chris Hohmann - 05 Jul 2008 23:22 GMT
> Here's the long story short.
> At work we have to real-time generate a report(excel format) which
[quoted text clipped - 15 lines]
> the
> helps I can get. Thanks.
Have you considered importing the data directly from Excel? This would
eliminate the need for IIS/ASP to act as an intermediary. Also, if the data
is summarized in Excel, you may want to consider performing the summary in
the database to limit the data that needs to be sent.