PrepAway - Latest Free Exam Questions & Answers

Category: 70-554

Exam 70-554: UPGRADE: MCSD Microsoft .NET Skills to MCPD Enterprise Application Developer by Using the Microsoft .NET Framework: Part 2

What should you do?

An application calls a Web method asynchronously by using the following code.

(Line numbers are included for reference only.)
01 void ProcessData() {
02 ProcessingService serviceProxy = new ProcessingService();
03 IAsyncResult asyncResult = null;
04 asyncResult = serviceProxy.BeginProcess(data, null, null);
05 while (!asyncResult.IsCompleted) {
06 Thread.Sleep(1000);
07 }
08
09 serviceProxy.EndProcess(asyncResult);
10 }
You need to ensure that the application can process and log any exceptions raised by the Web method.

What should you do?

What should you do?

You write a .NET Framework remoting application that broadcasts messages to client computers through a central server by raising events on the client computers.
Message details are contained in an argument in the event delegate, as shown in the following code segment.

public delegate void MessageArrivedHandler(BroadcastEventArgs args);

public class BroadcastEventArgs
{
public string Message;
public string Sender;
public DateTime TimeSent;
}

You need to ensure that the client computer can access the message details contained in the event argument.
Your solution cannot change the common language runtime (CLR) security restrictions.

What should you do?

What should you do?

A .NET Framework remoting server hosts a class library that contains the following class.

public class SimpleMathClass : MarshalByRefObject
{
public int LogData(DataRow dr)
{
//Lengthy database calls …
}
}

Users of a Windows-based client application report that the application often becomes nonresponsive.
You discover that the application makes calls to the LogData method that take several seconds to return.
The return value is required to generate reports in the client application.
You need to ensure that calls to the LogData method can be processed without making the client application nonresponsive.

What should you do?

What should you do?

Users report that a Windows-based application does not run properly.
When users attempt to complete a particular action, the following error message text appears.
Unable to find assembly ‘myservices, Version=1.0.0.0,Culture=neutral, PublicKeyToken=29b5ad26c9de9b95’.
You discover that the error occurs when the Windows-based application attempts to call functionality in a serviced component that was registered by using the following command.

regsvcs.exe myservices.dll
You need to ensure that the application can call the functionality in the serviced component without throwing the exception.

What should you do?

What should you do?

You create .NET Framework remoting components that must be deployed on an unattended application server.
IIS is not installed on the application server.
Company policy requires that no changes be made to the application server except the deployment of approved custom code that is written by your development team.
You need to ensure that the components can run on the unattended application server.

What should you do?

What should you do?

A Windows-based application receives messages from a message queue named PriorityQueue.
The client application sets the Priority property on the message before sending it.
However, received Message objects do not have the Priority property assigned.
The following code is used to receive the messages.

(Line numbers are included for reference only.)
01 MessageQueue queue = new MessageQueue(“.\\PriorityQueue”);
02 Message m = queue.Receive();
03 Console.WriteLine(m.Priority);

You need to ensure that the Windows-based application that receives the messages can access the Priority property.

What should you do?

What should you do?

You are writing an application that reads messages from a message queue.
The name of the message queue is stored in a member variable named queueName.
When a message is read, the application processes the message.
The code for the application is as follows:

class MyApp
{
MessageQueue queue;
public MyApp()
{
queue = new MessageQueue(queueName, QueueAccessMode.Receive);
queue.ReceiveCompleted += new ReceiveCompletedEventHandler(this.ReceivedMessage);
queue.BeginReceive();
}
bool KeepListening() { }
void ProcessMessage(Message m) { }
}

You need to ensure that the application continues to read messages when the KeepListening method returns True, and stops when the KeepListening method returns False.

What should you do?

What should you do?

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?


Page 25 of 43« First...1020...2324252627...3040...Last »