You are developing a Windows Presentation Foundation (WPF) application.
You are implementing the security features for a function that requires File IO. The callers of this function that are higher in the stack.. have permission to read the c:\temp directory
The function also accesses other resources that requires permission.
You need to be ensure that the function has the proper permission to read the c:\temp directory, and that all other resources in the .. still be accessed
A.
[FileIOPermissionAttribute[SecurityAction.Demand, Read=”C:\\TEMP”]
B.
[FileIOPermissionAttribute[SecurityAction.Assert, Read=”C:\\TEMP”]
C.
[FileIOPermissionAttribute[SecurityAction.PermitOnly, Read=”C:\\TEMP”]
D.
[FileIOPermissionAttribute[SecurityAction.InheritanceDemand, Read=”C:\\TEMP”]
Explanation:
B or C
I think both B and C are possible but B it’s preferable as you can read at MSDN “Using the Assert Method” (http://msdn.microsoft.com/en-us/library/91wteedy.aspx)