In this chapter we have attempted to explain the basics of .NET security. .NET security comes in two basic flavors: user-based security, and Code Access Security. The former determines which identity is executing code. The latter determines what rights the executing code itself has. Combining the two, you have the basic tools to provide robust security for all your .NET applications.