题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-10-27 00:07:30

[单项选择]You are implementing a Windows Communication Foundation (WCF) client application that consumes the ICatalog and lCatalog2 service interfaces.You need to ensure that the client discovers services implementing these interfaces. The services may already be online or may come online within a 30 second time limit. How should you use WCF Discovery to accomplish this?()
A. Create one FindCriteria object for each interface and set the Duration of each FindCriteria to 30 seconds. Call the FindAsync method of the DiscoveryClient class twice, one time for each of the FindCriteria objects, to search for the services.
B. Create one FindCriteria object for each interface and set the Duration of each FindCnteria to two seconds. Create a loop that calls the Find method of the DiscoveryClient class to search for the services. Within each loop iteration, call the Find method of the DiscoveryClient class once for each of the FindCriteria objects. Run the loop until a service is found or 30 seconds pass.
C. Create a single FindCriteria object and add both interfaces to its ContractTypeNames collection. Set the criteria's Duration to two seconds. Create a loop that calls the Find method of the DiscoveryClient class to search for the services. Within each loop iteration, call the Find method of the DiscoveryClient class to search for the services Run the loop until a service is found or 30 seconds pass.
D. Create a single FindCritera object and add both interfaces to the ContractTypeNames collection. Set the Duration to 30 seconds and use the FindAsync method of the DiscoveryClient class to search for the services.

更多"You are implementing a Windows Comm"的相关试题:

[单项选择] You are working with a Windows Communication Foundation (WCF) client application that has a generated proxy named SampleServiceProxy.When the client application is executing, in line 04 of the following code, the channel faults (Line numbers are included for reference only.) 01 SampleServiceProxy proxy = new SampleServiceProxy( ); 02 try 03 { 04 proxy.ProcessInvoice(invoice); 05 } 06 catch 07 { 08 if(proxy.State == CommunicationState.Faulted) 09 { 10 ... 11 } 12 } 13 proxy.UpdateCustomer(customer);You need to return proxy to a state in which it can successfully execute the call in line 13.Which code segment should you use at line 10?()
A. proxy.Close();
B. proxy = new SampleServiceProxy();
C. proxy.Abort();
D. proxy.Open();
[单项选择]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
[单项选择] You are debugging a Windows Communication Foundation (WCF) service. The service uses signed and encrypted messages.You need to configure logging so that you can read the contents of the messages. What should you do?()
A. Set maxSizeMessagesToLog to 10
B. Set logMessageAtServiceLevel to true.
C. Set maxMessagesToLog to 10.
D. Set logMessageAtTransportLevel to true.
[单项选择] You are creating a Windows Communication Foundation (WCF) service that is implemented as follows. (Line numbers are included for reference only.) 01 [ServiceContract] 02 [ServiceBehavior(IncludeExceptionDetailsInFaults = true)] 03 public class OrderService 04 { 05 [OperationContract] 06 public void SubmitOrder(Order anOrder) 07 { 08 try 09 { 10 ... 11 } 12 catch(DivideByZeroException ex) 13 { 14 ... 15 } 16 } 17 } You need to ensure that the stack trace details of the exception are not included in the error information sent to the client. What should you do?()
A. Replace line 14 with the following line: throw;
B. Replace line 14 with the following line: throw new FaultException(anOrder, ex.ToString());
C. After line 05, add the following line: [FaultContract(typeof(FaultException))] Replace line 14 with the following line: throw ex;
D. Alter line 05, add the following line: [FaultContract(typeof(FaultException))] Replace line 14 with the following line: throw new FaultException(anOrder, "Divide by zero exception");

[单项选择]You are moving a Windows Communication Foundation (WCF) service into production. You need to be able to monitor the health of the service. You only want to enable all performance counter instances exposed by the ServiceModelService counter group. Which element should you add to the system.serviceModel section in the application configuration file?()
A.
B.
C.
D.
[单项选择] You are developing a Windows Communication Foundation (WCF) service that contains the following service contract.[ServiceContract( )]public interface IPaymentService{ [OperationContract( )] void RecordPayments(Person person);}public class Person{ ... }public class Employee : Person{ ... }public class Customer : Person{ ... }You need to ensure that RecordPayments can correctly deserialize into an Employee or a Customer object. What should you do?()
A. Add the following KnownType attribute to the Employee class and to the Customer class. [KnownType(GetType(Person))]
B. Implement the IExtensibleDataObject interface in the Person class.
C. Implement the IExtension(ofType(T)) interface in the Person class.
D. Add the following KnownType attributes to the Person class. [KnownType(GetType(Employee))] [KnownType(GetType(Customer))]

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码