What is the recommended approach to dealing with process which take a long time to execute? I don't want to simply run it on the server since the page will time out.
I browsed the web and found multiple approaches - AJAX, Threading, Web Services... (none of which I have experience with)
What is the best practice method of dealing with this?
Thank you.
If you're just trying to do a long-running task, a Windows Service is perfect for this. No, not a web service but an old-school Windows Service. When somebody uploads an Excel your Windows Service can be monitoring a directory using FileWatcher, and then execute the import process automatically. That way you aren't limiting your process to ASP.NET and the IIS Worker processes, which can be recycled for any number of reasons. It sounds like your app really needs to be outside of IIS. The upload process can be a simple web front end to put that file into that directory that is monitored by your Windows Service.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With