You are an application developer for Company.com. You develop library assemblies that are called byyour main applications. These library assemblies access confidential data in the applications. To ensurethat this data is not accessed in an unauthorized and unsafe manner, users must not be allowed to callthe library assemblies from their own applications. You apply a strong name to all assemblies tosupport versioning.You need to prevent users from writing managed applications that make calls to your library assemblies.You need to achieve this goal while minimizing the impact on response times for applications.What should you do?A. Use the internal access modifier to declare all classes and structures in each library.B. Use the protected internal access modifier to declare all classes and structures in each library.C. Add the following attribute to each class and structure in each library assembly:<StrongNameIdentityPermission(SecurityAction.Demand, PublicKey:=”002400..bda4”)>D. Add the following attribute to each class and structure in each library assembly:<StrongNameIdentityPermission(SecurityAction.LinkDemand, PublicKey:=”002400..bda4”)>
Answer: CExplanation:StrongNameIdentityPermission Class
Defines the identity permission for strong names. This class cannot be inherited. For alist of all members of this type, see StrongNameIdentityPermission Members.System.Object System.Security.CodeAccessPermissionSystem.Security.Permissions.StrongNameIdentityPermission <Serializable>NotInheritable Public Class StrongNameIdentityPermission InheritsCodeAccessPermission Remarks Use StrongNameIdentityPermission to achieveversioning and naming protection by confirming that the calling code is in a particular strong-named code assembly. A strong name identity is based on a cryptographicpublic key called a blob optionally combined with the name and version of a specificassembly. The key defines a unique namespace and provides strong verification thatthe name is genuine, because the definition of the name must be in an assemblysigned by the corresponding private key. Note that the validity of the strong name keyis not dependent on a trust relationship or any certificate necessarily being issued for the key. Note Full demands for StrongNameIdentityPermission succeed only if all theassemblies in the stack have the correct evidence to satisfy the demand. Linkdemands using StrongNameIdentityPermissionAttribute succeed if only the immediatecaller has the correct evidence.
You are an application developer for your company. You are developing an application that can beextended by using custom components. The application uses reflection to In some cases, customcomponents will originate from a source that is not fully trusted, such as the Internet. You need toprogrammatically restrict the code access security policy under which custom components run so thatcustom components do not run with an elevated permission grant.What are two possible ways to achieve this goal? (Each correct answer presents a completesolution. Choose two.)A. Create a new application domain and set the security policy level. Run custom components in thisapplication domain.B. Use permission class operations to modify the security policy.C. Implement custom permission classes to protect custom component resources.D. Programmatically modify the machine-level security policy file after loading a custom
For Latest 70-340 Exam Questions and study guides- visit- http://www.examsking.com/70-340.html