Code Access Security (CAS) – "Guilty until proven Innocent" (Partially Trusted Code)


Server Intellect Web Hosting Solutions


Code Access Security (CAS) – "Guilty until proven Innocent" (Partially Trusted Code)

Author: Maxim V. Karpov

In my previous article on Code Access Security I barely scratched the surface, so in this installment I want to continue my endeavor with CAS and point out 3 different approaches regarding its use; (1) Configure Policy, (2) Sandbox pattern and (3) Install into a Global Cache Assembly, to successfully execute an assembly in the partially trusted execution environment. To start out, I will demonstrate how to make a local directory in order to execute code in a partial trust through the use of policy file. Then I will provide the guidelines for Sandboxing Pattern that will allow semi-trusted code to make calls inside of the fully trusted assemblies. In closing, I will talk about Microsoft technologies and how CAS effects them. In addition, I will demonstrate the above concepts through a series of code samples extracted through my own personal Courseware, which in turn you will be able to download and run for yourself. At the end of this reading, you should be able to understand (a) how to configure CAS security polices in order to allow semi-trusted code to perform needed operations and (b) how to write a wrapper assembly that vouchers (Assert/PermitOnly) for semi-trusted code to perform fully trusted operations.










More Tutorials

Also See:

Create a gallery without the use of any code
How to make ASP.NET Applications that support mobile devices
ADO.NET Code Generator - Map DataBase Objects To .NET Classes
Persistence
Themes In ASP.NET 2.0
Implementing Multilingual Applications in Microsoft .NET
Business Object Adapter for ASP.Net 2.0
Make Charts in ASP.NET 2.0
E-Mail in ASP.NET
Restart ASP.NET apps Programmatically, Log Application_End Events, and use Web Management logging



Copyright© 2005 ASP Intellect | All Rights Reserved

ASP.NET Tutorials
AspNet Tutorials ASP.NET 2.0 Code Examples, Snippets and Tutorials

ASP.NET Tutorials C++ Tutorials C# Tutorials Visual Studio.NET Tutorials
.NET Framework Tutorials Mobility Tutorials Office Tutorials Visual Basic.NET Tutorials