Is “Code Access Security” of any real world use?

前端 未结 8 1487
一向
一向 2020-12-02 08:38

Warning:

Newer versions of .Net and .Net core has have removed and/or changed “Code Access Security” (CAS) since this question was asked.

Original Questio

8条回答
  •  盖世英雄少女心
    2020-12-02 09:13

    We used CAS for our Applications was not really to hard, since we'd only tried to stop unauthuorized code execution. Problems came up once using our software from local network share, but a cas-policy cleaned the problem out.

    1. We secured all our assemblies using a strong name.
    2. We created a cas-policy for all assemblies with our strong name and allowed code signed with our strong name to start from local area network and locally placed code.
    3. Assemblies loaded from local area network needing local file access (component for burning data cds) needed to get the link-demand attribute on all public classes.

    Since update of .NET3.5 our problems were not existent anymore, since code on local area network is now handled like local code.

提交回复
热议问题