C#: windows application Caspol

577 Views Asked by At

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

There are 1 best solutions below

2
On

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.