PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

Which layer should you recommend?

You are designing a testing methodology for an ASP.NET MVC 2 Web application.
The application has a rich domain model that represents the logic and the data of the business.
A faade over the domain model provides a simplified API that is used by the controllers.
A data access layer beneath the domain model is used by the domain model to handle data storage and retrieval. You have the following requirements:
– Centralize business rules.
– Directly validate the accuracy of the business rules.
You need to design tests against the appropriate layer to meet the requirements.
Which layer should you recommend?

What are two possible ways to achieve this goal?

You are developing a Windows Communication Foundation (WCF) service that returns location information
for authorized law enforcement agencies. The service contract is as follows:

[ServiceContract]
public interface IMappingService
{
[OperationContract]
long[] GetLocationCoordinates(String cityName);
[OperationContract]
long[] GetLocationOfCitizen(String ssn);
}

Users are authenticated and impersonated. The system uses ASP.NET roles.
The members of law enforcement are members of the LawEnforcement role.
You need to ensure that only members of the LawEnforcement role can call these methods.
What are two possible ways to achieve this goal? (Each correct answer presents a complete solution. Choose two.)

Which connection string should you add to the .config file?

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. The application uses a Microsoft ADO.NET SQL Server managed provider.
When a connection fails, the application logs connection information, including the full connection string.
The information is stored as plain text in a .config file. You need to ensure that the database credentials are secure.
Which connection string should you add to the .config file?

Which connection string should you add to the Web.config file?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create a Microsoft ASP.NET application.
You want to connect the application to a Microsoft SQL Server Express 2008 database named MyDatabase.
The primary database file is named MyDatabase.mdf and it is stored in the App_Data folder.
You need to define the connection string. Which connection string should you add to the Web.config file?