Running Long Process From ASP.NET

G

Guest

I'm running a really long process from ASP.NET and need some help...

I am making a method call when the user presses a button from my webpage,
which goes into a database and parses a file. This process could exceed an
hour, so the user is expected to press the button to start the process and
minimize the IE window and do other work while the application is processing.
Anyway, after a certain period in time, the page becomes "Page could not be
displayed" and I need to figure out how to work around that. Is there a
setting in IIS or the web.config that can help me keep that page alive
instead of the "Page could not be displayed" webpage?

Is that possible? I know it may not lead to a good user experience but
that's how it has to be for now until we can revisit this issue later.

Thanks....
 
G

Guest

For queries that take that long consider an alternative approach such as:

1- User presses a button to start the process
2- The web application writes a file to the webserver
3- Write a customized windows service running on the web server that uses a
FileSystemWatcher to detect a change in the file in step 2.
http://msdn.microsoft.com/library/d.../frlrfsystemiofilesystemwatcherclasstopic.asp
4- The Windows service processes the database query, writes the returned
dataset data and schema to temporary files on the webserver (the names of the
file would have a uniqueID), and sends the user an email containing a link
with the UniqueID, e.g. ViewResults.aspx?DataSetUniqueID=12345
5- The user clicks on the link. The webpage figures the UniqueID and loads
the dataset.
6- Every day the windows service would clean up the dataset files from the
previous day

For help on writing a windows service:
http://msdn.microsoft.com/library/d...tingconfiguringwindowsserviceapplications.asp

Instead of an email sent to the user as a notification the process is
complete you may create a status page of submitted requests that the user
visits every one in a while until the report is complete.
 
G

Guest

Considering that I cannot rearchitect the way the application works, is there
any way for me to do this? Perhaps through an IIS setting, or the web.config
page? It seems like the session is dying....
 
P

Paul Henderson

A 'Page could not be displayed' in IE probably means that the browser
is itself timing out (which is unsurprising for such a long request).
Hence, the settings that need to be changed are on the client side (and
I don't know if the timeout actually *can* be changed). Why can't you
just make the long procedure run on a new thread in the site, invoked
when the user presses the button, then return immediately, then have
the browser automatically refresh to a page periodically to see if the
process is done (i.e. the thread has terminated). That doesn't need
much 'rearchitecting' - you just change the method call to run on a new
thread and add one new page to check the status...
 
E

Edwin Knoppert

This process could exceed an hour
It must be giant or simply poor parsing.
Guess what i think.. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top