PrepAway - Latest Free Exam Questions & Answers

Category: 70-529

Exam 70-529: TS: Microsoft .NET Framework 2.0 – Distributed Application Development.

What should you do to ensure that when the IncrementSession5Times method is run, the following output is displ

A Console Application calls a Web service named SessionStateService five times, sequentially.
The IncrementSessionCounter Web service method increments and returns an integer value that is held in a cookie.

(Line numbers are included for reference only.)
01 void IncrementSession5Times() {
02 SessionStateService service = null;
03 …
04 for (int i = 0; i < 5; i++) {
05 …
06 Console.WriteLine("Loop Pass {0} – result = {1}",
07 i,
08 service.IncrementSessionCounter());
09 }
10 }

You need to ensure that when the IncrementSession5Times method is run, the following output is displayed.

Loop Pass 0 – result = 1
Loop Pass 1 – result = 2
Loop Pass 2 – result = 3
Loop Pass 3 – result = 4
Loop Pass 4 – result = 5

What should you do?

What should you do to ensure that the Web Services Description Language (WSDL) for the Web service describes t

You are creating a Web service.
The Web service must be configured to receive the following message.

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<givenName xmlns="urn:SampleNS">given name</givenName>
<surname xmlns="urn:SampleNS">surname</surname>
</soap:Body>
</soap:Envelope>

You need to ensure that the Web Services Description Language (WSDL) for the Web service describes the message.

What should you do?

What should you do to ensure that the Windows-based application can connect to the component?

You create a serviced component.

You install the component into the COM+ catalog.
COM+ runs on the server.

A Windows-based application that is installed on multiple desktop computers must use the component.
The component must run on the server, but the Windows-based application must send component method calls over the network to the component.
The communications protocol used is DCOM.
You need to ensure that the Windows-based application can connect to the component.

What should you do?

What should you do to ensure that the GUI is updated without unnecessary delay?

You are writing an application that provides a graphical administrative interface to a message queue that displays information about the messages.
The GUI is updated in the AdminFunction function.
You need to ensure that the GUI is updated without unnecessary delay, and that processed messages contain the most recent message contents.

What should you do?

What should you do to ensure that the client Console Application calls the Add method on SERVER1?

An assembly named SimpleMathLib is deployed to the Bin folder that is under a virtual directory named SimpleMathHost, which is on an IIS server named SERVER1.
The SimpleMathLib assembly contains the following code.

namespace SimpleMath
{
public class SimpleMathClass : MarshalByRefObject
{
public double Add(double x, double y)
{
return x + y;
}
}
}

The Web.config file under the SimpleMathHost virtual directory contains the proper configuration to host SimpleMath as a remoting object.
You write a client Console Application and add a reference to the SimpleMathLib assembly.
You need to ensure that the client Console Application calls the Add method on SERVER1 and returns the correct sum of the parameters to the Console Application.

What should you do?

What should you do to ensure that the server can raise events on the client application?

You are writing a .NET Framework remoting client application.
The server application raises events to the client application using an interface named IBroadcaster and an event wrapper.
The event wrapper and the interface are located in an assembly named General that is common to the client and server.
The server configuration file is as follows:

<system.runtime.remoting>
<application>
<channels>
<channel ref="http" port="2020">
<serverProviders>
<formatter ref="binary" typeFilterLevel="Full" />
</serverProviders>
<clientProviders>
<formatter ref="binary" />
</clientProviders>
</channel>
</channels>
<service>
<wellknown mode="Singleton" type="Server.Broadcaster, Server" objectUri="Broadcaster.soap" />
</service>
</application>
</system.runtime.remoting>

You need to ensure that the server can raise events on the client application.

What should you do?

What should you do to ensure that the application does not fail when the Web service raises the exception?

An application fails when executing a specific operation.
You discover that the failure occurs when an exception is raised by a Web service.
The application uses the following code to call the Web service.

void Process()
{
ProcessService serviceProxy = new ProcessService();
serviceProxy.ProcessDataCompleted += new ProcessDataCompletedEventHandler(ServiceCompleted);
serviceProxy.ProcessDataAsync(data);
}

You need to ensure that the application does not fail when the Web service raises the exception.
Your solution must maximize the performance of your code.

What should you do?

What should you do to ensure that the server application can raise the event on the client computer?

You are converting an application to use .NET Framework remoting.

The server portion of the application monitors stock prices and contains a class named StockPriceServer, which is a Server Activated Object (SAO).
The client computer interacts with the server using a common assembly.
When the server attempts to raise an event on the client computer, the server throws the following exception.System.IO.FileNotFoundException.
You discover that the event delegate is not being called on the client computer. You need to ensure that the server application can raise the event on the client computer.

What should you do?


Page 1 of 3123