ASP page initiating complex code execution

P

Pavils Jurjans

Hello,

I need some advice, how to set up the following:

I have a web application, written in ASP.NET. User can ask this application
to prepare some report, that takes much processing time, thus it would be
inappropriate to let user wait until the report is ready. Instead, I'd like
the ASP code initiate some process, that is given some parameters, that
"lives" still after the ASP page that initiated it has finished it's
response streaming to user. This process could update progress state in
database, so user could check any time later in this web application, how
far the report generation has got. When this process has done it's deed, it
would save the result report in the database, and therefore user would be
able to download it.

I need advice, what would be the best way how to do it in the .net world.
ASP code launching executable? Requesting web service and ignoring it's
response (sort of odd adding the SOAP abstraction layer for local calls,
too)? Some other way?

Thanks,

Pavils
 
T

Tommy

Very interesting question.

You can have your thread make an asynchronous call to a private
method. This way the request can return immediately back to the user,
but at the same time, the asyn method will continue to finish
processing the request.

Sample:

delegateType d = new delegateType(this.AsynMethod);
IAsyncResult ar = d.BeginInvoke(null, null);

The above code will invoke the private method "AsynMethod"
asynchronously.

Tommy,
 

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

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top