How do I write partial trust applications?

From Guidance Share

Jump to: navigation, search

J.D. Meier, Prashant Bansode, Alex Mackman


Start by identifying the trust level which you want to target for your partially trusted ASP.NET code. If any of the standard partial trust levels like High, Medium, Low etc do not match your requirement then you can create custom trust policy as per your partial trust requirement. The second option is to choose one of the matching standard trust levels, lower then your requirement and move the privileged operation to a separate assembly which has full trust, and demand a custom permission to identify the calling code and then assert the required privilege permission before executing the privileged operation.

More Information

For more information Code Access Security please refer to “How To: Use Code Access Security in ASP.NET 2.0” at

Personal tools