S
Sacha Korell
I need to set up a FileSystemWatcher in my web application (to automatically
process uploaded files) and I'm trying to decide where to set it up. I would
like to keep it within the web app, but it needs to watch a certain folder
even when nobody is making a request. I could instatiate the
FileSystemWatcher in the Application_Start event, but what happens when
somebody restarts the server? I guess in that case the FileSystemWatcher
wouldn't work until the next person makes a request, right?
Would it be best to create a Windows Service that creates the
FileSystemWatcher and runs the appropriate code to process uploaded files?
In this case, if the web application gets moved to a different server,
someone would have to remember to install the Windows Service on that new
server.
Any suggestions would be greatly appreciated!
Thanks,
Sacha
process uploaded files) and I'm trying to decide where to set it up. I would
like to keep it within the web app, but it needs to watch a certain folder
even when nobody is making a request. I could instatiate the
FileSystemWatcher in the Application_Start event, but what happens when
somebody restarts the server? I guess in that case the FileSystemWatcher
wouldn't work until the next person makes a request, right?
Would it be best to create a Windows Service that creates the
FileSystemWatcher and runs the appropriate code to process uploaded files?
In this case, if the web application gets moved to a different server,
someone would have to remember to install the Windows Service on that new
server.
Any suggestions would be greatly appreciated!
Thanks,
Sacha