Question:You are developing a class library that will open the network socket
connections to computers on the network. You will deploy the class
library to the global assembly cache and grant it full trust. You write
the following code to ensure usage of the socket connections.
Dim objPermission As SocketPermission = New _
SocketPermission(System.Security.Permissions.PermissionState.Unrestrict
ed) objPermission.Assert()
Some of the applications that use the
class library might not have the necessary permissions to open the
network socket connections. You need to cancel the assertion. Which
code segment should you use?
 

A CodeAccessPermission.RevertAssert() 

B CodeAccessPermission.RevertDeny() 

C objPermission.Deny() 

D objPermission.PermitOnly() 

+ Answer
+ Report
Total Preview: 818

Copyright © 2024. Powered by Intellect Software Ltd