469,904 Members | 2,049 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

How start long-running application from a web page


I want to write a C#/ASP.NET application where a user can go to a web page, start running a job, close their browser, and then come back later and see the results. The purpose for this application is for a user to be able to use a page on our intranet to start running a time-consuming reporting and analysis job. I'm not sure how to start a process in ASP.NET and then "detach" it, or how to check that it's still running later. I think that maybe the best way to do this is COM+? I would appreciate any pointers on where to get started

Thanks, Marc
Jul 21 '05 #1
1 1845
I guess there are many ways to achieve this. Here are a several that spring
to mind (there are many, many more).

1) Write a request into a database table. Another process can poll the
table, pick up new requests, and handle them.

2) Use MSMQ (or Queued Components). Another process can wait on the queue,
and handle the request.

3) Put the request into a file, and drop in a specific folder. You can use a
file system watcher in another process to handle the request.

4) Use a asyncronous Remoting call to another process.

Basically, use some form of IPC to pass a message to another process.
Obviously, the other process will have to persist the result back somewhere,
to be collected by the ASP.NET application (if and when the user returns).

You'll need to pick one you are comfortable coding up, and that matches you
specific task.

Two ways I would not particularly recommend:

a) Start the work in a thread in the ASP.NET process. This could cause a
multitude of stability/security/performance problems.

b) Start up another process specifically to do the work. The problem here is
that if 100 users all come along at once, you'll go and start 100 process,
which will all compete for the same resources.

Nick.

"Marc" <gg@stober.mailsnare.net> wrote in message
news:B8**********************************@microsof t.com...

I want to write a C#/ASP.NET application where a user can go to a web page, start running a job, close their browser, and then come back later and
see the results. The purpose for this application is for a user to be able
to use a page on our intranet to start running a time-consuming reporting
and analysis job. I'm not sure how to start a process in ASP.NET and then
"detach" it, or how to check that it's still running later. I think that
maybe the best way to do this is COM+? I would appreciate any pointers on
where to get started!
Thanks, Marc

Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by engsol | last post: by
2 posts views Thread by ritesh | last post: by
4 posts views Thread by =?utf-8?B?Qm9yaXMgRHXFoWVr?= | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.