Search for user id, access to my system using C #

I am developing a small application using C # which

  • will work as a service
  • will track (uses FileSystemWatcher) and write changes made to files in a specific directory, for example C: \

I can achieve the above things, below are the things I'm looking for, pointers / suggestions

  • if someone accesses (with or without admin) my machine (using the "Run" command and passing the input as \\ mysystemname \ C $) and creates / deletes / modifies files in the directory, then how can I get the user id account records. For example, if I use System.Environment.UserName, then it gives my username.

Is it possible to track the above scenario if this can give me pointers.

+4
source share
1 answer

If this is tracking remote access to a file on a shared drive, you can check this open source project: http://www.codeproject.com/Articles/62357/Monitoring-Access-to-Your-Shared-Files-on-Network p>

Looking through the code, I don’t see exactly how the username is extracted, but the application is looking for the necessary functions.

0
source

All Articles