PrepAway - Latest Free Exam Questions & Answers

Category: 70-486 (v.1)

Exam 70-486: Developing ASP.NET MVC 4 Web Applications (update September 1st, 2014)

Which of the following is a method that should be included in your code?

Topic 1, Scenario 1
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.
*************************************

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?

Which of the following actions should you take?

Topic 1, Scenario 1
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.
*************************************

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?

Which of the following should be included in the line of code?

Topic 1, Scenario 1
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.
*************************************

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?

Which of the following is the attribute in question?

Topic 1, Scenario 1
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.
*************************************

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?

Which of the following actions should you take?

Topic 1, Scenario 1
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.
*************************************

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?

Whish of the following is a method that should be included in the code?

Topic 1, Scenario 1
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.
*************************************

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.
Whish of the following is a method that should be included in the code?

Which of the following actions should you take?

Topic 1, Scenario 1
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.
*************************************

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?

Which of the following actions should you take NEXT?

Topic 2, Scenario 2
Background
You are making use of Visual Studio 2012 to create an ASP.NET MVC online retail web
application.
Business Prerequisites
The entering of user e-mail addresses should not be compulsory. In the event that a user does
provide an e-mail address, the validity of the address should be authenticated. To motivate users
to keep on browsing the item list, you have to make sure that the first item on the item page
gradually disappears.
Furthermore, you have to make sure that administrators have the ability to manage current client
data, and also identify a default item on the item page.
Technical Prerequisites
General:
A load-balanced web farm, where the load balancer has not been configured to employ server
affinity, hosts the application
With regards to items, you are informed that the itemId property value should not be less than or
equal to 0. Furthermore, the Items page for mobile devices should be presented to mobile users
and the Items page for desktop computers should be presented to desktop users
Storage:
You are informed that information should be saved in a serialized XML data format, and that
serialized objects should be independent of the schema.
Exception handling:
A page showing support contact details should be presented for IIS exceptions. 404 errors
resulting from expired links cause exceptions to be thrown. Some page links expire, and users
who access these links encounter 404 errors. The WriteLog method of the Utility class should be
used to log these exceptions.
Browser and device support:
The application should allow for .bmp format images to be changed to .jpeg format images for
mobile devices, and to .png format images for desktop computers.
************************************

You have been tasked with creating a Communication Foundation (WCF) service that makes use
of the Item class. You are informed that the Item class should be updated in such a way that it
satisfies storage prerequisites.
You start by marking the Item class with the DataContract attribute.
Which of the following actions should you take NEXT?

Which of the following actions should you take?

Topic 2, Scenario 2
Background
You are making use of Visual Studio 2012 to create an ASP.NET MVC online retail web
application.
Business Prerequisites
The entering of user e-mail addresses should not be compulsory. In the event that a user does
provide an e-mail address, the validity of the address should be authenticated. To motivate users
to keep on browsing the item list, you have to make sure that the first item on the item page
gradually disappears.
Furthermore, you have to make sure that administrators have the ability to manage current client
data, and also identify a default item on the item page.
Technical Prerequisites
General:
A load-balanced web farm, where the load balancer has not been configured to employ server
affinity, hosts the application
With regards to items, you are informed that the itemId property value should not be less than or
equal to 0. Furthermore, the Items page for mobile devices should be presented to mobile users
and the Items page for desktop computers should be presented to desktop users
Storage:
You are informed that information should be saved in a serialized XML data format, and that
serialized objects should be independent of the schema.
Exception handling:
A page showing support contact details should be presented for IIS exceptions. 404 errors
resulting from expired links cause exceptions to be thrown. Some page links expire, and users
who access these links encounter 404 errors. The WriteLog method of the Utility class should be
used to log these exceptions.
Browser and device support:
The application should allow for .bmp format images to be changed to .jpeg format images for
mobile devices, and to .png format images for desktop computers.
************************************

You have received instructions to make sure that IIS errors are handled in accordance with the
prerequisites.
Which of the following actions should you take?

Which of the following actions should you take?

Topic 2, Scenario 2
Background
You are making use of Visual Studio 2012 to create an ASP.NET MVC online retail web
application.
Business Prerequisites
The entering of user e-mail addresses should not be compulsory. In the event that a user does
provide an e-mail address, the validity of the address should be authenticated. To motivate users
to keep on browsing the item list, you have to make sure that the first item on the item page
gradually disappears.
Furthermore, you have to make sure that administrators have the ability to manage current client
data, and also identify a default item on the item page.
Technical Prerequisites
General:
A load-balanced web farm, where the load balancer has not been configured to employ server
affinity, hosts the application
With regards to items, you are informed that the itemId property value should not be less than or
equal to 0. Furthermore, the Items page for mobile devices should be presented to mobile users
and the Items page for desktop computers should be presented to desktop users
Storage:
You are informed that information should be saved in a serialized XML data format, and that
serialized objects should be independent of the schema.
Exception handling:
A page showing support contact details should be presented for IIS exceptions. 404 errors
resulting from expired links cause exceptions to be thrown. Some page links expire, and users
who access these links encounter 404 errors. The WriteLog method of the Utility class should be
used to log these exceptions.
Browser and device support:
The application should allow for .bmp format images to be changed to .jpeg format images for
mobile devices, and to .png format images for desktop computers.
************************************

You have been instructed to write code that creates a method for the ItemController class. The
method must satisfy the prerequisites to handle exceptions related to logging.
Which of the following actions should you take?


Page 1 of 512345