Wednesday, October 1, 2008

UAC and event log writing

I have an application that writes errors to the eventlog of a clients machine, and I recently found that if the user has Vista installed and UAC is still on (which I can't imagine why people wouldn't turn it off, but you can't count on that), then you cannot write to the event log. Not only that, but

SecurityManager.IsGranted(New EventLogPermission(Permissions.PermissionState.Unrestricted))

will not give an accurate result back. Even with UAC turned on, this value will return back "TRUE", but then error out the instant i check:

EventLog.SourceExists

I get an error saying that I don't have the security privledges to do this. A window from the UAC doesn't even pop up for me to allow this either. If I turn UAC off, then this procedure works.

This does not perform how I would expect.

Labels: , , ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home