PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

Which code segment should you use?

You create a Web service that exposes a Web method named CalculateStatistics.

The response returned by the CalculateStatistics method for each set of input parameters changes every 60 seconds.
You need to ensure that all requests to the CalculateStatistics method that have the same set of input parameters, and that occur within a 60-second time period, calculate the statistics only once.

Which code segment should you use?

What should you do?

You have a Groove Server Manager server, a Groove Server Relay server, and a Groove Server Data Bridge server. A firewall separates your internal network from your perimeter network. You plan to install a custom application on the perimeter network. All Groove servers are installed on the internal network. You need to ensure that the custom application can communicate with Web services on a Groove server. What should you do?

Which code segment should you use?

You are customizing a Windows Form to use a BackgroundWorker component named bgwExecute. bgwExecute performs a database operation in an event handler named WorkHandler. You need to ensure that users can see the progress of the database operation by viewing a
progress bar named pbProgress. You want the progress bar to appear when the database operation is 50 percent complete. Which code segment should you use?

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 method in the Web service maintains session information between calls.
When a client invokes the method, the following exception is thrown :

System.Web.Services.Protocols.SoapException: Server was unable toprocess request. —> System.NullReferenceException: Object reference not set to an instance of an object.

You need to ensure that the Web service method can be called without generating an exception.

What should you do?