Get current/active security zone of a .NET application?

后端 未结 3 1431
伪装坚强ぢ
伪装坚强ぢ 2021-01-12 19:03

I have an application that behaves oddly, and just to verify, I\'d like to see which security zone it is currently running under.

I\'ve found the System.Security.Sec

3条回答
  •  野的像风
    2021-01-12 19:58

    You need to look at the CAS evidence for the current assembly;

    this.GetType().Assembly.Evidence

    Assembly.Evidence is a property Evidence object. From this you can enumerate the evidence and look for the zone which appears as a element.

提交回复
热议问题