You work as an Enterprise Application Developer for ABC Inc. The company uses Visual Studio.NET 2008 as its application development platform. You create a logging utility class using .NET Framework 3.5. The utility class writes logs to event log services. You are required to ensure that the client applications that use the utility class can create an instance of the utility class only if they have access rights to write to the event log services. What will you do?
A. Use role based security in the class constructor.
B. Use declarative security check on the assembly.
C. Use role based security on the class.
D. Use code access security on the class.
Answer:D
You work as an Enterprise Application Developer for ABC Inc. The company uses Visual Studio.NET 2008 as its application development platform. You create a logging utility class using .NET Framework 3.5. The utility class writes logs to event log services. You are required to ensure that the client applications that use the utility class can create an instance of the utility class only if they have access rights to write to the event log services. What will you do?
A. Use role based security in the class constructor. B. Use declarative security check on the assembly. C. Use role based security on the class. D. Use code access security on the class.