I have a windows application.. which will run in a very restricted environment ... The windows app queries event logs and performance counters.. it requires these permission.. the log in account being restricted disallow access to event logs and performance logs... I cant make any changes to the windows application... i was looking for a was of giving the assembly rights to access event logs + performance counters.. Or at the worst put the assembly in full trust...
+1
A:
If I understand your question, the application is going to run under the credentials of an account that does not have permission to access the event log & perf counters. If that's the case, no matter what you do with CAS policy, the application will not do what you want.
CAS policy cannot grant rights that the account does not have - so even if the application has full trust, it will not get access to any objects that the account does not have permission for.
Michael Burr
2009-02-09 05:07:29
Meaning i will have to use impersonation within the code? no other way?
2009-02-09 05:25:22
It seems to me either running under a different account or giving the account it runs under the necessary privileges would be simpler (impersonation would require changing the application).
Michael Burr
2009-02-09 08:05:13