简体   繁体   English

C#:Windows应用程序Caspol

[英]C#: windows application Caspol

我有一个Windows应用程序..该应用程序将在非常受限的环境中运行... Windows应用程序查询事件日志和性能计数器..它需要这些权限..受限制的登录帐户不允许访问事件日志和性能日志。 ..我无法对Windows应用程序进行任何更改...我一直在寻找授予程序集访问事件日志+性能计数器的权利。或者最坏的情况是使程序集完全受信任...

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策略做什么,应用程序都不会做您想要的。

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. CAS策略无法授予该帐户没有的权限-因此,即使应用程序具有完全信任,它也将无法访问该帐户没有权限的任何对象。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM