Solved

Background job in web site

Posted on 2013-02-07
4
362 Views
Last Modified: 2013-02-07
Hi.

I have a web based application running under IIS7.5 on a server to which I have full access. In this web application the clients can press a button that starts a lengthly job. Now, I want this job to allways finnish - even if the client logs out and closes the browser. I have a thought that the best would be if the button could trigger and run a completely different application on the server that will finish no matter what.

My question is: Is this the way to go and if so - how do you run this application from the web site and how do you pass all the parameters in the best manner. If this is not the way to go - how do you achieve the desired functionality in the best way?

Best regards
RTSol
0
Comment
Question by:RTSol
4 Comments
 
LVL 142

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 200 total points
ID: 38863856
in my company, we solve that this way:
* the request for the "lengthy job" is stored in a "to do queue"
* a service application polls that table (every x seconds or minuts), and executes what it has to do.
* the script/app that runs does some logging into a "log" table, so users (and admins) can see what is happening, at least up to some point.
0
 
LVL 30

Assisted Solution

by:IanTh
IanTh earned 100 total points
ID: 38863863
You wont be using a session so the user will need an account so he can get an update via email for instance when his job is finished and the job is assigned to his account.
0
 
LVL 33

Accepted Solution

by:
paulmacd earned 200 total points
ID: 38863916
The best solution will depend a lot on your technical expertise.  I would build a web service that interacts with the web site to get the work done whether or not the user was logged in.  The same web service could be queried for status information about the job.
0
 

Author Closing Comment

by:RTSol
ID: 38864242
Thanks guys. I will try out both suggestions. I will put the parameters in a data table and then go from there. Maybe the best is to have a web service and call it when the parameters are in the data table and then put back status indications.

Thanks a lot.
0

Featured Post

Promote certifications in your email signature

Has your company recently won an award or achieved a certification? They'll no doubt want to show it off. Email signature images used to promote certifications & awards can instantly establish credibility with a recipient and provide you with numerous benefits.

Join & Write a Comment

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now