Welcome to TestSimulate

Pass Your Next Certification Exam Fast!

Everything you need to prepare, learn & pass your certification exam easily.

365 days free updates. First attempt guaranteed success.

Microsoft TS: Windows Communication Foundation velopment with Microsoft .NET Framework 4 (070-513) Free Practice Test

Question 1
A Windows Communication Foundation (WCF) service is self-hosted in a console application. The service implements the ITimeService 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?

Correct Answer: A
Question 2
DRAG DROP
You have a client application that consumes a Windows Communication Foundation (WCF) service. The service contains a class named RegistrationService. The RegistrationService class contains two methods named SubmitRegistration and GetRegistrations.
The service has the following requirements:
- The client application must call the SubmitRegistration method synchronously.
- The client application must call the GetRegistrations method asynchronously.
You need to complete the client-side code to call the WCF service.
Which six code segments should you use in sequence? (To answer, move the appropriate six code segments from the list of code segments to the answer area and arrange them in the correct order.)
Correct Answer:
Question 3
A Windows Communication Foundation (WCF) service handles online order processing for your company.
You discover that many requests are being made with invalid account numbers. You create a class named AccountNumberValidator that has a method named Validate.
Before the message is processed, you need to validate account numbers with AccountNumberValidator and reject messages with invalid account numbers.
You create a new class that implements the IParameterInspector interface. Which code segment should you use in this class?

Correct Answer: A
Question 4
You are creating a Windows Communication Foundation (WCF) service that responds using plain-old XML (POX).
You have the following requirements:
- You must enable the /catalog.svc/items operation to respond using the POX, JSON, or ATOM formats. You also must ensure that the same URL is used regardless of the result type.
- You must determine the response format by using the Accepts HTTP header.
What should you do?

Correct Answer: B
Question 5
Your company has a Windows Communication Foundation (WCF) service at the URL http://services.contoso.com/OrderLookupService.svc.
The <system.serviceModel> section of the configuration file is as follows. (Line numbers are included for reference only.)
01 <system.serviceModel> 02 <behaviors> 03 <serviceBehaviors> 04 <behavior> 05 <serviceDebug includeExceptionDetailInFaults="false"/>
07 </behavior>
08 </serviceBehaviors>
09 </behaviors>
10 <serviceHostingEnvironmentmultipleSiteBindingsEnabled="true" />
11 </system.serviceModel>
You need to ensure that the service publishes the WSDL description at http://services.contoso.com/OrderLookupService.svc?wsdl.
What should you do?

Correct Answer: D
Question 6
You are developing a Windows Communication Foundation (WCF) service that executes a long-running operation.
The service is accessed from your business applications in a server transaction in which the client does not participate.
You need to ensure that the transaction times out and aborts if the operation has not completed within 45 seconds.
What should you do?

Correct Answer: A
Question 7
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?

Correct Answer: A
Question 8
You are creating a Window s Communication Foundation (WCF) service application. The
application needs to service many clients and requests simultaneously. The application also needs to ensure subsequent individual client requests provide a stateful conversation.
You need to configure the service to support these requirements.
Which attribute should you add to the class that is implementing the service?

Correct Answer: B
Question 9
You are creating a windows Communication Foundation (WCF) service to process orders.
The data contract for the order is defined as follows:
[DataContract]>
public class Order
{
[DataMemberl ()>
public string CardHolderName { get; set;
[DataMember] >
public string CreditCardNumber { get; set; }
)
You have the following requirements:
- Enable the transmission of the contents of Order from the clients to the service.
- Ensure that the contents of CreditCardNumber are not sent across the network in clear text.
- Ensure that the contents of CreditCardNumber are accessible by the service to process the order.
You need to implement the service to meet these requirements
What should you do?

Correct Answer: D
Question 10
Your Windows Communication Foundation (WCF) client application uses HTTP to communicate with the service.
You need to enable message logging and include all security information such as tokens and nonces in logged messages.
What should you do?

Correct Answer: A
Question 11
You have a Windows Communication Foundation (WCF) service.
The service has issues with performance when it receives messages on a specific endpoint. The service must collect the minimum number of performance counters to diagnose the message issues.
You need to configure the service.
In the web.config file for the service, what should you do?

Correct Answer: A
Question 12
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 (includeExceptionDetailslnFaults = true) 1
03putiic class OrderService
04{
05[Operation Contract]
06putiic void Submit Order (Order an Order)
07{
O8try
09{
10...
11)
12catch (DivideByZeroExcepton ex)
13{
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?

Correct Answer: B
Question 13
You create a Windows Communication Foundation (WCF) service.
You need to ensure that specific users can enable message logging for the service at runtime.
In the configuration file for the service, what should you do?

Correct Answer: C
Question 14
DRAG DROP
You develop a Windows Communication Foundation (WCF) service that is hosted within a console application. The service implements the IRegistrationService interface in a class named RegistrationService.
You need to add code to the console application to host the WCF service.
How should you complete the relevant code? (To answer, drag the appropriate code segment to the correct location in the answer area. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)
Correct Answer:
Question 15
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?

Correct Answer: B