What's a feasible method of implementing a “tasks” application that runs alongside an ASP.NET MVC site in Medium Trust?

StackOverflow https://stackoverflow.com/questions/3901488

Question

I'm writing an ASP.NET MVC site where I need to have a "Tasks" application that runs alongside the website. Such a "Tasks" application would collect data at set intervals and insert it into the database.

Of course, I could write a simple Console Application and use the Windows Task Scheduler to run it, but my site is being hosted by GoDaddy and I only have medium trust permissions.

Are there any methods for implementing such functionality while not violating medium trust permissions?

One method that I'm considering is a method in the site itself that gathers data, waits for a long time, and then gathers data again. Would that interupt users' connection to the site?

Was it helpful?

Solution

You can do it an ugly way.

Spin-off a thread which keeps on doing the tasks job. Initiate the thread with your own custom website request. The thread will keep running at the back-end.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top