.NET Security
Most application and component developers should not need anything special in order to work with the .NET security system and take advantage from the safety protection it provides.
The only code that represents an exception and requires more in depth knowledge and special consideration of the security system is secure libraries. These are the codes that differentiate between the secure managed world and the unmanaged native code; that is outside the ability of the .NET security system to enforce.
These libraries must be highly trusted to work, and are the areas in the managed code where programming errors can potentially expose security susceptibility. Code access security can't eliminate the potential human error, but compared to the much higher volume of application code that uses a few secure libraries, the amount of code that requires close scrutiny is substantially reduced.
.NET security protects code and data from misuse and damage by other code enforcing security permissions they need and the security policy established by an administrator to grant permissions based on determination of trust, or in some cases refuses to return the code.Trust is based on evidence about the code such as digital signature, where the code comes from, and so forth. Depending on whether granted or not, security enforces control to the respective code.