You are developing a Windows Service. The Windows Service will host a Windows Communication Foundation (WCF) service.
The Windows Service class will inherit from ServiceBase.
You need to ensure that the WCF service starts when the Windows Service is restarted.
What should you do in the Windows Service class?
A. Create a public method named Main. Create a new ServiceHost in the Main method. Override the OnShutdown method and close the ServiceHost.You are developing a data contract for a Windows Communication Foundation (WCF) service.
The data in the data contract must participate in round trips. Strict schema validity is not required.
You need to ensure that the contract is forward-compatible and allows new data members to be added to it.
Which interface should you implement in the data contract class?
A. ICommunicationObjectYou 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?
A. [ServiceContract(Namespace="Arithmetic")] public class Calculator { [OperationContract(Action="Sum")] public int Add(int x, int y) { ..... } }Your company has an existing Windows Communication Foundation (WCF) service. The following code segment is part of the service. (Line numbers are included for reference only.)

You need to ensure that AJAX client applications can access the service. Which code segment should you insert at line 02?

You have an existing Windows Communication Foundation (WCF) Web service.
The Web service is not responding to messages larger than 64 KB.
You need to ensure that the Web service can accept messages larger than 64 KB without generating errors.
What should you do?
A. Increase the value of maxReceivedMessageSize on the endpoint binding.You are creating a Windows Communication Foundation (WCF) service that implements operations in a RESTful manner. You need to add a delete operation.
You implement the delete method as follows.
void DeleteItems(string id);
You need to configure WCF to call this method when the client calls the service with the HTTP DELETE operation.
What should you do?
A. Add the WebInvoke(UriTemplate = "/Items/{id}", Method="DELETE") attribute to the operation.You are modifying a Windows Communication Foundation (WCF) service that issues security tokens. The service is accessible through the named pipe protocol. No endpoints are added in the service code. The configuration file for the service is as follows. (Line numbers are included for reference only.)

You need to ensure that new and existing client applications can access the service through HTTP and named pipes. What should you do?
A. Insert the following line at line 05.A service implements the following contract. (Line numbers are included for reference only.)

The service is implemented as follows.

ContosoService uses NetMsmqBinding to listen for messages. The queue was set up to use transactions for adding and removing messages.
You need to ensure that OperationOne and OperationTwo execute under the same transaction context when they are invoked in the same session.
What should you do?
A. Insert the following attribute to OperationOne on IContosoService. [TransactionFlow(TransactionFlowOption.Mandatory)] Insert the following attribute to OperationTwo on IContosoService. [TransactionFlow(TransactionFlowOption.Mandatory)]You are developing a Windows Communication Foundation (WCF) service that contains a method named ProcessPayments. The service is hosted in Internet Information Services (IIS).You have the following requirements:
Create a new instance of the service every time that a client application calls the ProcessPayments method.
Process every call from client applications one at a time.
You need to complete the code for the WCF service.
Which four code segments should you use in sequence? (To answer, move the appropriate code segments from the list of code segments to the answer area and arrange them in the correct order.)
Select and Place:

A Windows Communication Foundation (WCF) service listens for messages at net tcpilwwwcontoso.comMMyService. It has a logical address at http/Iwwwcontosocorn)MyService The configuration for the WCF client is as follows
bindinge"netTc pBinding" bindingConfiguraton-NetTc pBinding_lMyService contract="ServiceReference 1. IMyServce' name='NetTcpBinding_lllyService"/>v The generated configuration does not provide enough information for the client to communicate with the server. You need to update the client so that it can communicate with the server what should you do
B. In the client configuration, change the value of the address attribute to net.tcp:Ilwwwcontosocom/MyServicellisten=http:/Iwwwcontosocom/MyService.
C. After instantiating the client and before invoking any service operation, add this line of code client Endpoint BehaviorsAdd( new EndpointDiscoveryBehawior0{ Enabled true });
D. After instantiating the client and before invoking any service operation, add this line of code. client. Endpoint BehaviorsAdd( new Client ViaBehavior( new Uhcnet.tc pifwww.contoso. comiIMyService)))
Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Microsoft exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your 70-513 exam preparations and Microsoft certification application, do not hesitate to visit our Vcedump.com to find your solutions here.