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?

A message queue named SecureQueue requires incoming messages to be authenticated.
When an application attempts to send a message to SecureQueue, the following exception is thrown.
User’s internal Message Queuing certificate does not exist.The following code is used to send the message.

(Line numbers are included for reference only.)
01 MessageQueue mq = new MessageQueue(“.\\SecureQueue”);
02 Message m = new Message(“Test Message”);
03 m.UseAuthentication = true;
04 mq.Send(m);

You need to ensure that a message can be sent to SecureQueue without the exception being thrown.

What should you do?

What should you do?

A file named Util.asmx contains the following code segment.

(Line numbers are included for reference only.)
01 <%@ WebService Language=”C#” class=”Exam.Util” %>
02 namespace Exam {
03 public class Util {
04 public string GetData() {
05 return “data”;
06 }
07 }
08 }

You need to expose the GetData method through a Web service.

What should you do?

What should you do?

You are writing an application that calls a Web service.
The application must call the Web service asynchronously and also perform a small amount of processing while the Web service is running.
The return value from the Web service is required for additional processing.
You need to ensure that the application can call the Web service asynchronously and also process the return value.
Your solution must keep processor cycles to a minimum.

What should you do?

What should you do?

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?

Which two actions should you perform?

You are writing an application that handles the batch processing of user accounts.
The application assigns network identities for users by calling the following Web service method.

[WebMethod]
public string GetNetworkID(string name)
{ …}

The application calls the Web
service using the following code.

(Line numbers are included for reference only.)
01 void ProcessPeople(List<Person> people) {
02 PersonService serviceProxy = new PersonService();
03 serviceProxy.GetNetworkIDCompleted += new
04 GetNetworkIDCompletedEventHandler(GetNetworkIDCompleted);
05 for (int i = 0; i < people.Count;i++) {
06 …
07 }
08 }
09
10 void GetNetworkIDCompleted(object sender,
11 GetNetworkIDCompletedEventArgs e){
12 Person p = null;
13 …
14 p.NetworkID = e.Result;
15 ProcessPerson(p);
16 }

You need to ensure that the application can use the data supplied by the Web service to update each Person instance. Which two actions should you perform? (Each correct answer
presents part of the solution. Choose two.)

What should you do?

A class library named MathLib contains the following code.

public class MathClass : MarshalByRefObject
{
public decimal DoHugeCalculation(int iterations)
{
decimal result;
//Some very lengthy calculations …
return result;
}
}

The MathLib class is hosted in a .NET Framework remoting server application.
A Windows application project running on a client computer contains the following class.

public class MathClient
{
public void ProcessHugeCalculation(int iterations)
{
MathClass cm = new MathClass();
decimal decRes = cm.DoHugeCalculation(iterations);
//process the result …
}
}

The MathClient class must call the MathClass class asynchronously by using remoting.
A callback must be implemented to meet this requirement.
You need to complete the implementation of the MathClient class.

What should you do?

What should you do?

You are writing a .NET Framework remoting client application that must call two remoting servers.
The first server hosts an assembly that contains the following delegate and class definition.

public delegate bool IsValidDelegate(string number, Int16 code);

public class CreditCardValidator : MarshalByRefObject
{
public bool IsValid (string number, Int16 code)
{
//some data access calls that are slow under heavy load …
}
}

The second server hosts an assembly that contains the following delegate and class definition.

public delegate float GetCustomerDiscountDelegate( int customerId);

public class PreferredCustomer
{
public float GetCustomerDiscount(int customerId)
{
//some data access calls that are slow under heavy load …
}
}

You configure the remoting client application to call both server classes remotely.
The amount of time it takes to return these calls varies, and long response times occur during heavy load times.
The processing requires the result from both calls to be returned.
You need to ensure that calls to both remoting servers can run at the same time.

What should you do?

What should you do?

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?

What should you do?

You create a .NET Framework remoting application that provides stock information to customers.
The server component raises an event on the client computer when certain conditions are met.
You need to ensure the server raises exactly one event for each client application that is registered for the event.

What should you do?

What should you do?

You are writing a Web service application that uses Web Services Enhancements (WSE) 3.0 policies.
The Web service request and response data must be signed.
Routing occurs between the client and server computers, and uses the Action SOAP header of the SOAP messages.
You need to ensure that the SOAP signature is not invalidated when the SOAP message is routed.

What should you do?


Page 37 of 43« First...102030...3536373839...Last »