What should you do?
You are an enterprise application developer. You are implementing a new component for an application. The component accesses a database to populate a list of customer objects and exposes a method that is named GetAllCustomers. The component uses a design pattern to access the database only on an as-needed basis. A caching mechanism exists in a lower tier of the application architecture. The component must not cache data. You need to implement the logic for populating a list of customer objects by using a database query. You also need to ensure that you meet the company guidelines for the component design pattern. What should you do?
What should you do?
A client application must connect to a .NET Framework remoting class that is running in a Windows service that is deployed to a computer named APPSERVER1.
The class is named SimpleMathClass and it exists within a namespace named SimpleMath in an assembly named SimpleMathLib.
It is exposed through the TCP and it is configured with the objectUri attribute set to SimpleMath.rem.
You write the following XML configuration settings in the App.config file of the client application.
<configuration>
<system.runtime.remoting>
<application>
</application>
</system.runtime.remoting>
</configuration>
You need to ensure that the client application can connect to the remoting class.
What should you do?
What are two possible ways to achieve this goal?
You use Microsoft Visual Studio 2005 to create a custom Web service discovery system that contains Disco files for your Web services.
You need to have the Disco file for each of your Web services for auditing purposes.
What are two possible ways to achieve this goal? (Each correct answer presents a complete solution. Choose two.)
What should you do?
You call a method in a Web service.
The following exception is thrown in the Web service client.
System.Web.Services.Protocols.SoapException: Server was unable toprocess request. –> System.NullReferenceException: Object reference not set to an instance of an object.
You discover that it is the following line of code that throws the exception.
if (Session [“StoredValue”] == null)
You need to ensure that the method runs without throwing the exception. What should you do?
What should you do?
You create a Web service.
The Web service must be deployed on a remote Web server.
You need to ensure that the deployment does not place the source code for the Web service on the Web server.
What should you do?
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?
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?
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 conclude?
You are an enterprise application developer. Your company has a Web-based application that runs on a single Web server. Session information is currently being stored by using the default session mode. You are redesigning the application to run in a Web farm. You must ensure that the failure of any single server does not make session information unavailable. A developer in your team recommends using the default session mode on each server in the Web farm. You need to evaluate this recommendation. What should you conclude?
Which solution should you recommend?
You are an enterprise application developer. You create a client application. One thousand customer service agents use the application during their core business hours, from 8:00 to 17:00.
The application confirms to the following design details:
* The application uses separate business logic components and data access logic components.
* The data components run on the client computer and connect to a central Microsoft SQL Server 2005 database server.
* When the application starts, it retrieves datasets to populate list boxes, drop-down list boxes, and TreeView controls that have data common to all users.
* Users are authenticated to the database by using Active Directory.
Users report that the application is slow to start. You need to recommend a solution so that the application starts normally. You want to achieve this goal with the minimum programming effort.
Which solution should you recommend?