PrepAway - Latest Free Exam Questions & Answers

Category: 70-513

Exam 70-513: TS: Windows Communication Foundation Development with Microsoft .NET Framework 4

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?

Which code segment should you use to retrieve the claim for validation?

You are creating a Windows Communication Foundation (WCF) service that uses claims-based authorization.
The following code retrieves the correct claim set.

var claims = ServiceSecurityContext.Current.AuthorizationContext.ClaimSets[0];

You need to validate that the requesting client application has included a valid DNS value in the claim.
Which code segment should you use to retrieve the claim for validation?

What should you do in WMI Control in the Computer Management console?

You create a Windows Communication Foundation (WCF) service. It is deployed on Microsoft Internet Information Services (IIS)
with an application pool running as Network Service. You enable WMI tracing before launching the service.
Your IT support staff adds WMI data collection through ASP.NET WMI tracing.

You need to restrict the collection of WMI data to a privileged account.
What should you do in WMI Control in the Computer Management console?

Which attribute should you use to decorate the service?

You are developing a Windows Communication Foundation (WCF) service that does not operate on a duplex channel.
You find that operations do not start until all previous operations have finished. The service hosting code contains the following lines.

var service = new WarehouseService();
var host = new ServiceHost(service);

You need to ensure that new operations do not wait for previous operations to finish. Which attribute should you use to decorate the service?

What should you do?

You are developing a Windows Communication Foundation (WCF) service that allows customers to update financial data.
The client applications call the service in a transaction. The service contract is defined as follows.
(Line numbers are included for reference only.)

01 [ServiceContract]
02 public interface IDataUpdate
03 {
04 [OperationContract]
05 [TransactionFlow(TransactionFlowOption.Mandatory)]
06 void Update(string accountNumber, double amount);
07 }
08
09 …
10 class UpdateService : IDataUpdate
11 {
12 [OperationBehavior(TransactionScopeRequired = true, TransactionAutoComplete = true)]
13 public void Update(string accountNumber, double amount)
14 {
15 try
16 {
17 …
18 }
19 catch(Exception ex)
20 {
21 WriteErrorLog(ex);
22 …
23 }
24 }
25 }
26

Customers report that the transaction completes successfully even if the Update method throws an exception.
You need to ensure that the transaction is aborted if the Update method is not successful. What should you do?

What should you add to the service configuration file?

You are developing a Windows Communication Foundation (WCF) service.
You establish that the largest size of valid messages is 8,000 bytes. You notice that many malformed messages are being transmitted.
Detailed information about whether each message is malformed must be logged.

You need to ensure that this information is saved in XML format so that it can be easily analyzed.
What should you add to the service configuration file?

Which code segment should you use?

You are developing a new version of an existing message contract named CustomerDetailsVersion1.
The new version of the message contract must add a Department field of type String to the SOAP header.
You create a new class named CustomerDetailsVersion2 that inherits from CustomerDetailsVersion1.

You need to ensure that all client applications can consume the service. Which code segment should you use?

[WebInvoke(UriTemplate = "/statuses/update.xml?

You are developing a Windows Communication Foundation (WCF) client application.
The client application contains the following code.

[ServiceContract]
public interface ISocialStatus
{
[OperationContract]
[WebInvoke(UriTemplate = “/statuses/update.xml?status-{text}”)]
void UpdateStatus(string text);
}
public class SocialClient : ClientBase<ISocialStatus>, ISocialStatus
{

}

The configuration file contains the following lines.

<system.serviceModel>
<client>
<endpoint name=”SocialClient” address=”http://contoso.com”
binding=”webHttpBinding” contract=”SocialApp.ISocialStatus”
bindingConfiguration=”BindingConfig” />
</client>
<bindings />
</system.serviceModel>

You need to ensure that the service is consumed. Which code segment should you use?

What should you do?

You are configuring services to be discoverable. The services must be discoverable without relying on a central server.
Client applications that consume the services are on a network segment that is separate from the network segment that the services are located on.
A firewall blocks all TCP ports between the two network segments, but allows other protocols to pass through.
You need to ensure that the client applications can discover the services. What should you do?


Page 3 of 1512345...10...Last »