多项选择题
You are creating a Windows Communication Foundation (WCF) service that accepts claims-based tokens. You need to ensure that the service can use claims from trading partners even though there are variations on naming for the same elements.Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)()
A. Register a custom Service Authorization Manager that implements Check Access. In this method, use System.Convert.ChangeType to transform the incoming claim set to a WindowsClaimSet type.
B. Apply a PrincipalPermission attribute on the operation with the required claims listed in the Roles property.
C. Within the operation, verify the presence of the required claims in the current AuthorizationContext.
D. Register an AuthorizationPolicy that maps external claims to an internal ClaimSet.
相关考题
-
多项选择题
A self-hosted Windows Communication Foundation (WCF) service uses a secure HTTP binding with a custom principal permission mode. The binding requires users to provide their Windows logon credentials. You need to retrieve the identity of the caller.What are two possible properties you can use to achieve this goal? (Each correct answer presents a complete solution Choose two)()
A. Thread.CurrentPrincipal.Identity.Name
B. HttpContext.Current.User.Identity.Name
C. ServiceSecurityContext.Current.PrimaryIdentity.Name
D. OperationContext.Current.ServiceSecurityContext.PrimaryIdentity.Name -
多项选择题
You are creating an ASP.NET web application that hosts several Windows Communication Foundation (WCF) services. The services have ASP.NET Compatibility Mode enabled. Users authenticate with the Web application by using a cookie-based ASP.NET Forms Authentication model. You add a service file named Authentication.svc that contains the following code segment: <%@ ServiceHost Service="System.Web.ApplicationServices.AuthenticationService" Factory="System.Web.ApplicationServices.ApplicationServicesHostFactory" %> You need to ensure that users can access the WCF services without having to re-authenticate. Which two configuration settings should you add? (Each is part of a complete solution. Choose two.)()
A. In the system web. Extensions scripting/webServices/authenticationService element, set the enabled attribute to true.
B. In the system web. Extensions scripting/webServices/profileService element, set the enabled attribute to true.
C. Add a service endpoint with basicHttpBinding for the contract System.Web.ApplicationServices.AuthenticationService.
D. Add a custom service behavior named AuthenticationService Type Behaviors with a service AuthenticationManager element that has service AuthenticationManagerType set to System.Web.Security.SQL Membership Provider -
单项选择题
You have a self-hosted Windows Communication Foundation (WCF) service. You need to configure the service to provide an X509 certificate during authentication. What should you use to configure the service?()
A. the Certificate property of the X509 Certificate lnitiator Service Credential class
B. the SetCertificate method of the X509 Certificate Initiator Service Credential class
C. the SetCertificate method of the X509 Certificate Recipient Service Credential class
D. the TrustedStoreLocation property of the X509 Certificate Recipient Service Credential class
