Understanding .NET SecurityAction for Permissions

Can someone explain the meaning and purpose of the values ​​for enumerating SecurityAction?

The MSDN page is not very clear. He says that LinkDemand happens when compiling at exactly the point in time, while Demand occurs at run time.

Why is there a difference and in what situations would I use LinkDemand and not Demand?

Similarly, what are preferred examples of other interesting values, such as InheritenceDemand, Assert, and PermitOnly.

+5
source share
1 answer

LinkDemand , . , , , , , , , , , ( , , . ).

LinkDemand JIT, , JIT , LinkDemand, , . , , . , LinkDemand . , . LinkDemand , ITS ( ) . ( , , , , LinkDemand.) Demand , ( , ), .

- Demand. , Demand, , Assert ( , Assert ). , LinkDemand, , Assert .

Demand, , . , , , , , .

PermitOnly Deny, , EXCEPT .

InheritanceDemand, , , , , , InheritanceDemand. , , , , -.

+18

All Articles