PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

[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 next?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application.
The application connects to a Microsoft SQL Server 2008 database.
You need to ensure that the application calls a stored procedure that accepts a table-valued parameter.
You create a SqlParameter object. What should you do next?

How should you design the validation?

You are designing an application by using Windows Presentation Foundation (WPF), Microsoft .NET Framework 4, and Microsoft SQL Server 2008.

The application will contain several forms that include custom data validators.

You need to ensure that data is validated before the database updates occur. You also need to ensure that the validation logic can be reused.

How should you design the validation?

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?

What should you do?

You are updating a Windows desktop client application that was created by using Microsoft .NET Framework 4 and Microsoft Visual Studio 2010.

The application displays data derived from several database queries. The display takes a long time to update.

The application currently uses a BackgroundWorker thread and a Parallel.ForEach statement on that thread.

Users have requested a modification to the program that would allow them to interrupt the display of data and begin processing a new and different query.

You decide to provide a new Stop button on the user interface (UI) to allow the user to terminate the current data display and initiate the new query.

The main UI thread must be notified when the current data processing is terminated so that the new query can be started.

You need to implement the Stop button event handler.

What should you do?