ASP Programming Question:

Download Job Interview Questions and Answers PDF

What do I have to do to make my code work with the security system?

ASP Programming Interview Question
ASP Programming Interview Question

Answer:

Usually, not a thing—most applications will run safely and will not be exploitable by malicious attacks. By simply using the standard class libraries to access resources (like files) or perform protected operations (such as a reflection on private members of a type), security will be enforced by these libraries. The one simple thing application developers may want to do is include a permission request (a form of declarative security) to limit the permissions their code may receive (to only those it requires). This also ensures that if the code is allowed to run, it will do so with all the permissions it needs.
Only developers writing new base class libraries that expose new kinds of resources need to work directly with the security system. Instead of all code being a potential security risk, code access security constrains this to a very small bit of code that explicitly overrides the security system.

Download ASP Programming Interview Questions And Answers PDF

Previous QuestionNext Question
Can I use the Win32 API from a .NET Framework program?Why does my code get a security exception when I run it from a network shared drive?