Reputation: 2366
I have a website that constantly scans a folder for files and then performs some actions on them. I dropped several thousand of these files into the directory, it started chugging but when I came back in the morning there were still files there. When I opened up a new session it started working again. Is it possible to keep this function running without a user having a session open?
Upvotes: 0
Views: 92
Reputation: 2562
Try using Quartz.net. It is a scheduler that will run tasks for you.
Upvotes: 0
Reputation: 1916
in IIS, remove the session expiration time on both the website and the application pool. This means that once you fire/lookup the site once, it never shuts down. But as @Yuriy mentioned, what you're doing shouldn't be done via a website... get the information/perform your tasks using a windows service, and if need be, implement a way to display the tasks that were done in a website. But the web site shouldn't be doing the heavy lifting.
Upvotes: 2
Reputation: 731
Session is user-specific.If you do not want session state enabled for your application, you can set the session mode to Off. please refer this msdn post.
Upvotes: 0