What could cause FileSystemWatcher to only trigger methods when a user is connected to the website?

Glenn Van der Straeten 96 Reputation points
2020-11-06T15:17:44.313+00:00

I have a FileSystemWatcher that is supposed to process incomming files (on an IIS server, in ASP.NET Core, hosted on Windows Server) and after processing these, move them to another destination.

It works like a charm, but only when there are users connected to the website, I was wondering what causes this kind of behaviour.

Extra info: When a file pops up in the directory it is listening to and there is no user connected to the website, the code that is defined in the Watcher_Created() method is not executed, and when processing multiple files, upon disctonnection the other files are no longer beeing processed.

Any advice?

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,945 questions
0 comments No comments
{count} votes

1 additional answer

Sort by: Most helpful
  1. EasyOley 6 Reputation points
    2020-11-06T21:42:25.75+00:00

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.