What should you do?
The endpoint of a Windows Communication Foundation (WCF) service uses basicHttpBinding for its binding. Your company’s policies have changed to require that messages not be sent in clear text.
You must ensure that all messages are encrypted when traveling across the network.
What should you do?
Which XML segment should you add to the system.serviceModel/diagnostics/messageLogging/filters configuration e
A Windows Communication Foundation (WCF) service has the following contract.
[ServiceContract(Namespace=”http://contoso.com”)]
public interface IShipping
{
[OperationContract]
string DoWork(int id);
}
This is one of several service contracts hosted by your application. All endpoints use SOAP 1.2 bindings with WS-Addressing 1.0. The System.ServiceModel.MessageLogging trace source in the system.diagnostics configuration section is configured with one listener.
You need to make sure that only the messages that are returned from the DoWork operation are logged.
Which XML segment should you add to the system.serviceModel/diagnostics/messageLogging/filters configuration element?
Which code segment should you use?
You are creating a Windows Communication Foundation (WCF) service. You do not want to expose the internal implementation at the service layer.
You need to expose the following class as a service named Arithmetic with an operation named Sum.
public class Calculator
{
public int Add(int x, int y)
{
}
}
Which code segment should you use?
Which element should you add to the system.serviceModel section in the application configuration file?
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 4.0.0.0 counter group.
Which element should you add to the system.serviceModel section in the application configuration file?
Which URI should you specify in the endpoint configuration settings of the service?
You are developing a Windows Communication Foundation (WCF) service that reads messages from a public non-transactional MSMQ queue. You need to configure the service to read messages from the failed-delivery queue. Which URI should you specify in the endpoint configuration settings of the service?
What should you do?
You are creating a Windows Communication Foundation (WCF) service based on WSHttpBinding. New audit requirements dictate that callers must be authenticated on every call to ensure that their credentials have not been revoked.
You need to ensure that the service will not cache the security request token.
What should you do?
Which code segment should you use?
You are consuming a Windows Communication Foundation (WCF) service in an ASP.NET Web application. The service interface is defined as follows.
[ServiceContract]
public interface ICatalog
{
[OperationContract]
[WebGet(UriTemplate = “/Catalog/Items/{id}”,
ResponseFormat = WebMessageFormat.Json)]
string RetrieveItemDescription(int id);
}
The service is hosted at /Catalog.svc.
You need to call the service using jQuery to retrieve the description of an item as indicated by a variable named itemId.
Which code segment should you use?
What should you do?
A Windows Communication Foundation (WCF) service has a callback contract.
You are developing a client application that will call this service.
You must ensure that the client application can interact with the WCF service.
What should you do?
Which class should you use?
You are building a client for a Windows Communication Foundation (WCF) service.
You need to create a proxy to consume this service.
Which class should you use?
Which message encoding should you use?
A Windows Communication Foundation (WCF) service is responsible for transmitting XML documents between systems. The service has the following requirements:
It must minimize the transmission size by attaching the XML document as is without using escape characters or base64 encoding.
It must interoperate with systems that use SOAP but are not built on the .NET platform.
You need to configure the service to support these requirements.
Which message encoding should you use?