Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get user name for file activity
Message
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01395901
Message ID:
01395923
Views:
73
>Hello All, I have written a Windows Service which consists of a FileSystemWatcher monitoring some network folders, on creation of a new file or deletion of an existing, a record is inserted into a SQL table ( all works very well ). What I would like to have , is , the userid of the person who created (or deleted ) the file ( not the original creator in the case of a deletion - but the person who deleted it). As this service runs on a server I always get the userid of the server user (Administrator) I don't know if this is possible but thought I'd ask.

Windows doesn't record this info so there isn't any easy way of doing this. If you really need to track this, you can look at writing a File System Filter Driver.

http://www.microsoft.com/whdc/driver/filterdrv/default.mspx

Or, if you have more control over the file creating/deletion you could write their user info out when it occurs, Or, if the doc. types embed extra info (for example, a Word doc) you might be able to extract it from there.
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform