Ensurepass

 

Background

You are making use of Visual Studio 2012 to create an ASP.NET MVC application to log training information for a cycling club.

 

Business Requirements

The application needs to host data regarding training dates, distances, and duration. Application users must be able to view and modify data. The application itself should be highly accessible. The application should also allow for times to be presented in the user’s native time.

 

Technical Requirements

A public class, named CyclistLog.DataAccess.CyclistLogDb, deals with database access. HTTP GET should be used for all data retrieval. HTTP POST should be used for all data updates.

 

A master layout file, named \Views\Shared\_Layout.cshtml, is used by all pages in the application.

 

The application makes use of the \Models\LogModel.cs model.

 

The Razor view engine is used for all views in the application. The \Views\CyclingLog includes the _CalculateSpeed.cshtml, EditLog.cshtml, GetLog.cshtml, and InsertLog.cshtml views. The application, however, includes a \Views\Home\Index.cshtml view.

 

The controller included in the application is \Controllers\CyclingLogController.cs. You have also included a timer.png image in the \Images folder.

 

When a user examines a cycling log, the user’s trail map is accessible. This map is configured as a video and an Adobe Flash application. The browser should using H264, Ogg, or WebM formats (in this order) to present the video natively. The Flash application should be used In the event that the video cannot be presented.

 

Security

The application should make use of forms authentication, and requires user logon for entering information. The editing or deleting of cyclist information requires a user to be a member of the Admin role.

 

Users must be members of the Admin role to.

 

You need to the application should be defended against cross-site request forgery. The SHA1 algorithm should be used to hash passwords.

 

A custom role provider must be included in CyclistLog.Providers.CyclingLogRoleProvider.es.

 

 

QUESTION 100

You have received instructions to make sure that the Views\CyclingLog\_CalculateSpeed.cshtml partial view, from the Views\Cyclelog \GetLog.cshtml, is configured to show the cyclist’s average speed per kilometer. You need to write the necessary code to apply the view. Which of the following is a method that should be included in your code?

 

A.

The DisplayFor method.

B.

The ExhibitFor method.

C.

The PresentFor method.

D.

The ConcealFor method.

 

Correct Answer: A

 

 

QUESTION 101

You have been instructed to meet the business requirements with regards to security. You are required to make changes to the CyclingLogController. Which of the following actions should you take?

 

A.

You should consider adding code to assign users the Administrator role.

B.

You should consider adding code to assign users the Advanced Operator role.

C.

You should consider adding code to assign users the Author role.

D.

You should consider adding code to assign users the Report Security Administrator role.

 

Correct Answer: A

 

 

 

 

 

 

 

QUESTION 102

You have been instructed to insert a line of code into your existing code that allows for the “Distance” header of the table to be displayed in bold in the Views/CyclingLog/GetLog.cshtml view. Which of the following should be included in the line of code?

 

A.

You should consider including the :first-child pseudo-class.

B.

You should consider including the :last-child pseudo-class.

C.

You should consider including the :nth-child pseudo-class.

D.

You should consider including the :nth-last-child(n) pseudo-class.

 

Correct Answer: C

 

 

QUESTION 103

You have been asked to make sure that the edit action of RunLogController is extended.

 

You start by writing the following lines of code:

 

[HttpPost]

 

[ActionName (“Editlog”)]

 

You are required to make use of a specific attribute next.

 

Which of the following is the attribute in question?

 

A.

The [ValueProviderCollection] attribute.

B.

The [ValidateInput] attribute.

C.

The [ValidateAntiForgeryToken] attribute.

D.

The [ValidatableObjectAdapter] attribute.

 

Correct Answer: C

 

 

QUESTION 104

You have been tasked with making sure that the application is configured to make use of a custom role provider, named CyclingLogRoleProvider. Which of the following actions should you take?

 

A.

You should consider making changes to the machine.config file.

B.

You should consider making changes to the app.config file.

C.

You should consider making changes to the web.config file.

D.

You should consider making changes to the client.config file.

 

Correct Answer: C

 

 

QUESTION 105

You are preparing to write code that prevents invalid parameters from being distributed to the EditLog action. To achieve this, you are required to build the route in a certain way. Which of the following is a method that should be included in the code?

 

A.

You should consider including the MapRoute method

B.

You should consider including the IgnoreRoute method

C.

You should consider including the GetVirtualPathForArea method

D.

You should consider including the ReRoute method

 

Correct Answer: A

 

 

QUESTION 106

You want to make sure that the application exhibits the text, “Cycling 2013”. The text should be exhibited in the footer in the last part of the _Layout.cshtml file, and should be formatted by JavaScript. You want to make sure that, based on browser support, the text is exhibited as plain text or formatted text. Which of the following actions should you take?

 

A.

You should consider changing the InsertLog.cshtml view.

B.

You should consider changing the EditLog.cshtml view.

C.

You should consider changing the layout.

D.

You should consider changing the _CalculateSpeed.cshtml view.

 

Correct Answer: C

 

Instant Access to Download Latest Complete Collection of Microsoft 70-486 Real Exam

Try Microsoft 70-486 Free Demo