situation 1:
A file is created by a user at a ASP.NET page, maybe by clicking on a button.
After that, the user might just go offline (away from the site)
The file will be deleted automatically after 15 minutes.
situation 2:
User A click on a button
Application["count"] = (int)Application["count"] + 1;
After that, within 10 seconds, if there is any other user click on the same button. The value will increment.
Application["count"] = (int)Application["count"] + 1;
Lets says, at the 6th second, no more user is accessing the site.
At the 10th second, the server will automatically carry out some action to do something.
May I know how to do this?
Is there any hints? or Articles that I can start to look/learn?
Thanks you very much.
This is a common problem for web sites and the right answer is to build a separate Windows Service which carries out the background tasks.
There are several kinds of smart tricks to schedule things to be done inside the IIS worker process, but all of them are unsafe because
Your Windows Service can either expose a WCF service that is called internally by the web site code to schedule stuff or pick up work items from a common database.