C
chad.poplawski
Hi All,
I'm working on a Windows Service that uses FileSystemWatcher components
to capture and log data when certain actions (such as files being
deleted) take place in the file system. I am trying to figure out how
to obtain the WindowsIdentity (User Name, Login, etc.) of the actual
user that performed the action (for example, DOMAINNAME\CPoplawski
deleted a file). Simply retrieving the WindowsIdentity within the
service does not work, as it returns SYSTEM because the service runs
under the Local System account. Is there any way, maybe similar to
Impersonation in ASP.Net, to accomplish this?
Regards,
Chad Poplawski
I'm working on a Windows Service that uses FileSystemWatcher components
to capture and log data when certain actions (such as files being
deleted) take place in the file system. I am trying to figure out how
to obtain the WindowsIdentity (User Name, Login, etc.) of the actual
user that performed the action (for example, DOMAINNAME\CPoplawski
deleted a file). Simply retrieving the WindowsIdentity within the
service does not work, as it returns SYSTEM because the service runs
under the Local System account. Is there any way, maybe similar to
Impersonation in ASP.Net, to accomplish this?
Regards,
Chad Poplawski