题目
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
第1题
Windows Communication Foundation (WCF) service is self-hosted in a console application. The service implements the lTimeService service interface in the TimeService class.You need to configure the service endpoint for HTTP communication. How should you define the service and endpoint tags?()
A.
B.
C.
D.
第2题
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
第3题
A Windows Communication Foundation (WCF) service is self-hosted in a console application. The service implements the IDataAccess contract, which is defined in the MyApplication namespace. The service is implemented in a class named DataAccessService which implements the IDataAccess interface and also is defined in the MyApplication namespace. The hosting code is as follows. (Line numbers are included for reference only.)01 static void Main(string[] args)02 {03 ServiceHost host;04 ...05 host.Open();06 Console.ReadLine();07 host.Close();08 }You need to create a ServiceHost instance and assign it to the host variable. You also need to instantiate the service host.Which line of code should you insert at line 04?()
A. host = new ServiceHost("MyApplication.DataAccessService");
B. host = new ServiceHost("MyApplication.DataAccess");
C. host = new ServiceHost(typeof(IDataAccess));
D. host = new ServiceHost(typeof(DataAccessService));
第4题
A.
B.
C.
D.
第6题
A.shall close the window before we leave
B.will close the window before we leave
C.must close the window before we leave
D.close the window before we leave
为了保护您的账号安全,请在“赏学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!