PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

What should you do?

A client application calls a Windows Communication Foundation (WCF) service with a proxy class that was generated by Visual Studio.
The service binding was changed from wsHttpBinding to basicHttpBinding. The method signatures in the service contract are changed.
After these changes, the client application receives errors when calling methods on the service.
You need to ensure that the client can invoke methods on the service successfully. What should you do?

Which class should you use?

You are developing a Windows application by using Microsoft .NET Framework 4.

You plan to design a diagnostic logging strategy that will be used in a production environment.

You need to ensure that the strategy meets the following requirements:
Enables or disables diagnostic messages by using an application configuration option. Changes the level of detail in the diagnostic messages without recompiling the application.

Which class should you use?

What should you do?

A Windows Communication Foundation (WCF) service is hosted in Microsoft Internet Information Services (IIS).
You are preparing the configuration file for production deployment. You need to set up tracing so that an administrator can adjust
the System.ServiceModel trace level without causing the ASP.NET host application domain to restart.
You need to ensure that tracing is turned off by default. What should you do?

Which code segment should you use?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application.
The application connects to a Microsoft SQL Server database.
You use the following SQL statement to retrieve an instance of a DataSet object named ds:

SELECT CustomerID, CompanyName, ContactName, Address, City
FROM dbo.Customers

You need to query the DataSet object to retrieve only the rows where the ContactName field is not NULL. Which code segment should you use?

Which data access technology should you use?

You are developing a Windows application by using Microsoft .NET Framework 4, Microsoft Visual Studio 2010, and Microsoft SQL Server 2008.

The application will store data in a SQL Server database instance.

You plan to use the Code Generation technology to develop data entities.

You need to ensure that the following requirements are met:
When the application runs, a database must be created if it does not already exist. When the database schema changes, data entities must be added dynamically.

Which data access technology should you use?

Which two actions should you perform?

You are developing a Windows Communication Foundation (WCF) service to provide an in-memory cache.
The following code is part of your solution. (Line numbers are included for reference only.)

01
02 public interface IInMemoryCacheService
03 {
04 [OperationContract()]
05 string GetCachedItem(string key);
06
07 [OperationContract()]
08 void CacheItem(string key, string item);
09
10 }
11
12 [ServiceBehavior(InstanceContextMode=InstanceContextMode.Single)]
13 public class CacheService : IInMemoryCacheService
14 {
15
16 Hashtable cache = new Hashtable();
17
18 public string GetCachedItem(string key)
19 {
20 return cache(key).ToString();
21 }
22
23 public void CacheItem(string key, string item)
24 {
25 if (cache.Contains(key))
26 cache.Remove(key);
27 cache.Add(key, item);
28 }
29 }

Users report that the cache is getting updated with cache changes of other users.
You need to ensure that each user’s cache is maintained and isolated from other users.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

What are two possible ways to achieve this goal?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application.
The application connects to a Microsoft SQL Server 2008 database.
You create classes by using LINQ to SQL based on the records shown in the exhibit:

You need to create a LINQ query to retrieve a list of objects that contains the OrderID and CustomerID properties.
You need to retrieve the total price amount of each Order record. What are two possible ways to achieve this goal?
(Each correct answer presents a complete solution. Choose two.)