468,761 Members | 1,766 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,761 developers. It's quick & easy.

Running Long Process From ASP.NET

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....
Dec 29 '05 #1
4 1782
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/de...classtopic.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/de...plications.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.

--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"ImSoLost" wrote:
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....

Dec 29 '05 #2
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....
Dec 29 '05 #3
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...

Dec 29 '05 #4
>This process could exceed an hour
It must be giant or simply poor parsing.
Guess what i think.. :)
"ImSoLost" <Im******@discussions.microsoft.com> schreef in bericht
news:57**********************************@microsof t.com...
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....

Dec 30 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Bob Murdoch | last post: by
1 post views Thread by walterbyrd | last post: by
4 posts views Thread by commander_coder | last post: by
2 posts views Thread by =?Utf-8?B?QWxwaGFwYWdl?= | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.