C# logon and logoff events are create when checking anything on the network
Posted on 2013-12-10
I've create a simple C# service that is checking the existence of a shared network path (on a domain) every 20 seconds.
the service is running using an account with Domain Admin rights.
My problem is that every 20 seconds a logon event is created (4624) and after 12 seconds a logoff event is created (4634).
Why? Is there a way to prevent that? I need the service to check every 20 seconds. I have no problem that it will logon once. But why it logs off every 12 seconds and logged on again?