Click here to Skip to main content
15,890,123 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am already finish all logic but my problems is I run the website and i need my Asp.net development server collect the data on ftp server and to store database on every 5 minutes. I will close the website but not stop the asp.net development server after I need the 5 minutes process is run continuously.

thanks for helping,
muruga
Posted
Updated 16-May-14 2:15am
v2

ASP.Net is not a continually running process. It only responds to requests and then stops. If you want something that will continuously be checking or running you should use a windows service instead. Likely most of your code can be converted over, depending on how you modularized it.
 
Share this answer
 
Hi,

An asp.net website is particularly unsuited to this task, if it isn't used for a while the objects are all destroyed to help server performance.
You could write a bepage that refreshes itself every five minutes, and in so doing kicks off the processing you want. This is not a good solution however, if the browser is closed the code will fail to run, if the period is increased beyond the asp.net limit (normally 20mins) it will become inefficient. Also, if the machine is re-booted someone will need to remember to re-start the browser (or remember to put opening the browser in the machine's startup.

I suggest you write either a windows service or a console app that is scheduled to run every five mins. Writing a service can be tricky, I suggest using a framework called topshelf, which has removed a lot of the heavy lifting for me in the past.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900