PrepAway - Latest Free Exam Questions & Answers

Tag: Exam 70-513 (update October 28th, 2015)

Exam 70-513: TS: Windows Communication Foundation Development with Microsoft .NET Framework 4 (update October 28th, 2015)

Which code segment should you use in this class?

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?

What should you do?

You are creating a Windows Communication Foundation (WCF) service that responds using
plainold 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?

Which line of code should you insert at line 04?

A Windows Communication Foundation (WCF) service is self-hosted in a console
application. The service implements the IDataAccess contract, which is defined in the
MyApplication namespace. The service is implemented in a class named
DataAccessService, which implements the IDataAccess interface and also is defined in the
MyApplication namespace. The hosting code is as follows. (Line numbers are included for
reference only.) 01 static void Main(string[] args) 02 { 03 ServiceHost host; 04 05
host.Open(); 06 Console.ReadLine(); 07 host.Close(); 08 } You need to create a
ServiceHost instance and assign it to the host variable. You also need to instantiate the
service host. Which line of code should you insert at line 04?

Which XML segment should you add to the system.serviceModel configuration section of the web.config file?

Four Windows Communication Foundation (WCF) services are hosted in Microsoft Internet
Information Services (IIS). No behavior configuration exists in the web.config file. You need
to configure the application so that every service and endpoint limits the number of
concurrent calls to 50 and the number of concurrent sessions to 25. Which XML segment
should you add to the system.serviceModel configuration section of the web.config file?

Which two actions should you perform?

You are adding a Windows Communication Foundation (WCF) service to an existing
application. The application is configured as follows. (Line numbers are included for
reference only.) 01 <configuration> 02 < system.serviceModel > 03 <services> 04 <service
name=” Contoso.Sales.StockService ” 05 behaviorConfiguration =” MetadataBehavior ” >
06 <host> 07 < baseAddresses > 08 <add baseAddress
=”http://contoso.com:8080/StockService” /> 09 </ baseAddresses > 10 </host> 11
</service> 12 </services> 13 <behaviors> 14 < serviceBehaviors > 15 <behavior name=”
MetadataBehavior “> 16 </behavior> 17 </ serviceBehaviors > 18 </behaviors> … You need
to configure the service to publish the service metadata. Which two actions should you
perform? (Each correct answer presents part of the solution. Choose two.)


Page 3 of 2312345...1020...Last »