PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

What should you use?

You develop a Windows Communication Foundation (WCF) service. It is used exclusively as an intranet application and is currently unsecured.

You need to ensure that the service meets the following requirements:
* The service now must be exposed as an Internet application.
* The service must be secured at the transport level.
* Impersonation and delegation cannot be enabled.

What should you use?

Whis code would fit this business rule?

You are a tasked with performing a code review. The business rule is the following:
* If INSERTs into the first table succeed, then INSERT into the second table.
* However, if the INSERTs into the second table fail, roll back the inserts in the second table but do not roll back the inserts in the first table.
* Although this can also be done by way of regular transactions, It needs to be performed using TransactionScope objects.

Whis code would fit this business rule?

Which two actions should you recommend?

You are designing a health monitoring strategy for an ASP.NET Web application.
The Web application must raise failure events to correspond with key business process failures.
You need to recommend an approach for ensuring that failure events can be consumed by the ASP.NET Health Monitoring framework.
Which two actions should you recommend?
(Each correct answer presents part of the solution. Choose two.)

What should you recommend?

An ASP.NET Web application is deployed on a single Web server.
Web application state for client requests is stored in a Microsoft SQL Server 2008 database.
The Web application must meet the following requirements:
– Tolerate a Web server failure.
– Scale gracefully to accommodate a rapid load increase.
You need to recommend an approach for accommodating a load increase.
What should you recommend?

Which code segment should you insert at line 04?

You are developing a Windows Communication Foundation (WCF) REST service to provide access to a library book catalog.
The following code segment defines the service contract. (Line numbers are included for reference only.)

01 [ServiceContract()]
02 [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
03 public Class LibraryService
04 {
05 public Book GetBookByTitle(string title)
06 {
07 …
08 }
09
10 [WebGet(UriTemplate = “Book/{id}”)]
11 public Book GetBookById(string id)
12 {
13 …
14 }
15 }

Library patrons want the ability to search the catalog by title.
You need to ensure that the GetBookByTitle method is exposed as a service method.
Which code segment should you insert at line 04?

Which code segment should you insert at line 11?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application.
You create a Database Access Layer (DAL) that is database-independent. The DAL includes the following code segment.
(Line numbers are included for reference only.)

01 static void ExecuteDbCommand(DbConnection connection)
02 {
03 if (connection != null){
04 using (connection){
05 try{
06 connection.Open();
07 DbCommand command = connection.CreateCommand();
08 command.CommandText = “INSERT INTO Categories (CategoryName) VALUES (‘Low Carb’)”;
09 command.ExecuteNonQuery();
10 }
11 …
12 catch (Exception ex){
13 Trace.WriteLine(“Exception.Message: ” + ex.Message);
14 }
15 }
16 }
17 }

You need to log information about any error that occurs during data access.
You also need to log the data provider that accesses the database. Which code segment should you insert at line 11?