Which code segment should you use?
You are creating an application that consumes a Windows Communication Foundation
(WCF) service. The service implements the IService contract. The client application
contains the CallbackHandler class, which implements IServiceCallback. You need to
ensure that a client proxy is created that can communicate with the service over a duplex
channel. Which code segment should you use?
You need to ensure that the client sends a SOAP body that is accepted by the service
You need to configure logging so that you can read the contents of the messages
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?
Which type of exception should the client catch?
You are developing a client application that consumes a Windows Communication
Foundation (WCF) service. The operation contract is as follows. [OperationContract]
[FaultContract(typeof(SalesFault))] string GetSales(string saleld); The service configuration
file contains the following line in the serviceBehaviors section. <behavior> <serviceDebug
inc1udeExceptionDetoillnFauIts-“True”/> </behavior> A divide-by-zero exception is not
being handled by the service. You need to ensure that the exception is caught in the client
application. Which type of exception should the client catch?
Which hosting environment should you choose?
You are developing an application that performs file backups in the background. The
background application will host a Windows Communication Foundation (WCF) service and
must be active as soon as the machine is running. The background application will not have
a user interface. A frontend application will consume the WCF service and will provide the
user interface. You need to choose a host environment for the WCF service. Which hosting
environment should you choose?
Which ReliableSessionBindingElement property should you configure?
You are developing a Windows Communication Foundation (WCF) service. Client
applications require reliable sessions to access the service. Users report that they receive
ServerTooBusyException errors when their client application tries to establish a session.
You need to ensure that the service can handle a minimum of 30 client connection requests.
Which ReliableSessionBindingElement property should you configure?
Which code segment should you add at line 04?
You are developing a Windows Communication Foundation (WCF) service. You enable
message logging, trace listeners, activity propagation, and tracing on the trace sources. You
have the following code segment in the client application. (Line numbers are included for
reference only.) You encounter errors when your client application consumes the service.
You need to ensure that your client application can correlate tracing information with the
service. Which code segment should you add at line 04?
Which code segment should you use to set the service behavior?
You are developing a Windows Communication Foundation (WCF) service. One of the
service operations contains the following code. private static int counter = 0;
[OperationContract] public void IncrementCount() [ counter++; } You need to set a service
behavior that prevents two or more threads from incrementing the counter variable at the
same time. Which code segment should you use to set the service behavior?
Which two actions should you perform?
You are developing a Windows Communication Foundation (WCF) service to provide
shopping cart support. ASP.NET compatibility mode is not enabled. The shopping cart
information must be retained across user visits to the store until the user explicitly empties
the cart or submits the cart contents to order. You need to implement the service as a
DurableService. Which two actions should you perform? (Each correct answer presents part
of the solution. Choose two.)
You need to ensure that your service works with the load balancer
A Windows Communication Foundation (WCF) service is deployed with netTcpBinding. This
sen/ice uses a duplex message exchange pattern. You are developing the next version of
the WCF service. You discover that your company’s hardware load balancer performs
correctly only for WCF services that use HTTP. You need to ensure that your service works
with the load balancer. What should you do?