多项选择题
A. Add a PrincipalPermissionAttribute to each method that should be available only to members of law enforcement. Set its SecurityAction to Demand and set the role equal to LawEnforcement.
B. Use the CurrentPrincipal property of the thread. Call the IsInRole method specifying LawEnforcement as a parameter.
C. Create a GenericPrincipal specifying Thread.CurrentPrincipal.Identity as the IIdentityParameter and LawEnforcement as the only value for the Roles parameter.
D. At the beginning of each method, enumerate each ClaimSet in a new WindowsClaimSet. Use the FindClaims method to locate a claim type named Role with a right named LawEnforcement.
单项选择题 You need to modify a client application that consumes a Windows Communication Foundation (WCF) service. The service metadata is no longer available. You need to modify the previously generated proxy to include asynchronous calls to the service. What should you do? ()
单项选择题 following code segment. [ServiceContract] public interface ICustomerService { ... } public class CustomerService : ICustomerService { ... } The service is self-hosted in a console application. Older client applications access the service at http://contoso.com:8080/CustomerService/V1. Newer client applications access the service at http://contoso.com:8080/CustomerService/V2. You need to ensure that any client application can access the service at either address. Which code segment should you use?()
单项选择题 You create a service and deploy it on a network in a building named Building1. You will deploy the service to Building2. The service in Building1 is configured using the following discovery scopes. The service in Building2 will be configured using the following discovery scopes. You need to ensure that the client application can discover the service in Building1 or the service in Building2. Which scopes should you add to the client configuration file? ()