Question:You are creating a class library that connects to an intranet Web server. You plan to deploy the class library to the global assembly cache (GAC) with full trust. You add the following code:
Dim connectPattern As Regex = New Regex("http://intranet\.contoso\.com/.*")
Dim webPermissions As WebPermission = _
New WebPermission(NetworkAccess.Connect, connectPattern)
webPermissions.Assert()
Which method should you call to cancel the assertion?
 

A webPermissions.PermitOnly() 

B webPermissions.Deny() 

C CodeAccessPermission.RevertAssert() 

D CodeAccessPermission.RevertDeny() 

+ Answer
+ Report
Total Preview: 1071

Copyright © 2024. Powered by Intellect Software Ltd