Security is a very important topic to any program, especially ASP.NET applications, because you are essentially allowing any one in the world to access your server's file system. Even with desktop-based applications, you are often exposed to unknown and potentially threatening code (as demonstrated by the prolificacy of computer viruses in today's world).
The CLR takes a number of precautions to prevent unauthorized access by applications or users. In addition, the security framework is consolidated and integrated into .NET, so any application can use the same concepts and objects to prevent misuse. Now you'll take a deeper look into how security works with .NET.
Everything in .NET security is based on permissions. Code ...