Want to Pass 70-486 Exam In Next HOURS? Get it now →
April 21, 2017

Apr 2017 updated: Examcollection Microsoft 70-486 latest exam 31-40

Q31. - (Topic 3) 

You are creating a new authentication system that uses an HTTP header value. 

The existing authentication system must continue to operate normally. 

You need to implement the custom authentication. 

What should you do? (Each correct answer presents a complete solution. Choose all that 

apply.) 

A. Create a class derived from ActionResult and check for a valid HTTP header value in the ExecuteResult method. Change all actions to return this new class. 

B. Create an HttpHandler to check for a valid HTTP header value in the ProcessRequest method. 

C. Create an HttpModule and check for a valid HTTP header value in the AuthenticateRequest event. 

D. Create a class derived from AuthorizeAttribute and check for a valid HTTP header value in the AuthorizeCore method. Change usages of the existing AuthorizeAttribute to use the new class. 

Answer: C,D 


Q32. Topic 1, Olympic Marathon 

Background 

You are developing an ASP.NET MVC application in Visual Studio 2012 that will be used by Olympic marathon runners to log data about training runs. 

Business Requirements 

The application stores date, distance, and duration information about a user's training runs. The user can view, insert, edit, and delete records. 

The application must be optimized for accessibility. 

All times must be displayed in the user's local time. 

Technical Requirements 

Data Access: 

Database access is handled by a public class named 

RunnerLog.DataAccess.RunnerLogDb. 

All data retrieval must be done by HTTP GET and all data updates must be done by HTTP 

POST. 

Layout: 

All pages in the application use a master layout file named \\Views\\Shared\\_Layout.cshtml. 

Models: 

The application uses the \\Models\\LogModel.cs model. 

Views: 

All views in the application use the Razor view engine. 

Four views located in \\Views\\RunLog are named: _CalculatePace.cshtml EditLog.cshtml GetLog.cshtml InsertLog.cshtml 

The application also contains a \\Views\\Home\\Index.cshtml view. 

Controllers: 

The application contains a \\Controllers\\RunLogController.cs controller. 

Images: 

A stopwatch.png image is located in the \\Images folder. 

Videos: 

A map of a runner's path is available when a user views a run log. The map is implemented 

as an Adobe Flash application and video. The browser should display the video natively if possible, using H264, Ogg, or WebM formats, in that order. If the video cannot be displayed, then the Flash application should be used. 

Security: 

You have the following security requirements: The application is configured to use forms authentication. Users must be logged on to insert runner data. Users must be members of the Admin role to edit or delete runner data. There are no security requirements for viewing runner data. You need to protect the application against cross-site request forgery. Passwords are hashed by using the SHA1 algorithm. 

RunnerLog.Providers.RunLogRoleProvider.cs contains a custom role provider. 

Relevant portions of the application files follow. (Line numbers are included for reference only.) 

Application Structure 

- (Topic 1) 

You need to ensure that the application uses RunLogRoleProvider custom role provider. 

How should you modify the web.config file? (To answer, drag the appropriate line of code to the correct location or locations. Each line of code may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.) 

Answer: 


Q33. - (Topic 4) 

You are developing an ASP.NET MVC application by using Visual Studio. 

The application throws and handles exceptions when it runs. 

You need to examine the state of the application when exceptions are thrown. 

What should you do? 

A. Add the following code to the web.config file of the application. 

<customErrors mode=”On” > 

<error statusCode=”404” redirect=”CustomErrors.html” /> 

</customErrors> 

B. From the Debug menu in Visual Studio, select Exceptions. Disable the User-unhandled 

check box for Common Language Runtime Exceptions. 

C. Add the following code to the web.config file of the application. 

<customErrors mode=“On” > 

<error statusCode=”500” redirect=”CustomErrors.html” /> 

</customErrors> 

D. From the Debug menu in Visual Studio, select Exceptions. Enable the Thrown check 

box for Common Language Runtime Exceptions. 

Answer:

Explanation: Configuring the debugger to break for first chance exceptions 

To change when the debugger breaks, go to Debug->Exceptions… 

When you first open this window you will see that there is a tree grid with one column and checkboxes. 

Break when Thrown. This includes a default list of exceptions known by the debugger, 

grouped by category. 

Note: The possible exceptions that could break from this list is determined by the runtime 

you are debugging. For example, if you are using managed-only debugging then the 

debugger will never break for C++, Win32 Exceptions, etc. even if they are configured to 

break when thrown. 

Checkboxes. If you check the box for a category, then the debugger will break for all First 

Chance Exceptions while debugging. If you don’t want to enable all First Chance 

Exceptions, you can find the specific exception types that you wish to configure by using 

the search box. 

Reference: Understanding Exceptions while debugging with Visual Studio 

http://blogs.msdn.com/b/visualstudioalm/archive/2015/01/08/understanding-exceptions-while-debugging-with-visual-studio.aspx 


Q34. - (Topic 4) 

You are designing a distributed application. 

The application must store secure information that is specific to an individual user. The data must be automatically purged when the user logs off. 

You need to save transient information in a secure data store. 

Which data store should you use? 

A. Session state 

B. Database storage 

C. Profile properties 

D. Application state 

Answer:


Q35. DRAG DROP - (Topic 4) 

You are developing an ASP.NET MVC application in Visual Studio. 

The application contains an area that is defined as shown in the following graphic. 

The ActionLink method must invoke the GetOrders() action in ExternalOrderController. 

You need to configure the parameters of the ActionLink method. 

You have the following markup. 

Which markup segments should you include in Target 1, Target 2 and Target 3 to complete the markup? To answer, drag the appropriate markup segment to the correct targets. Each markup segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content. 

Answer: 


Q36. DRAG DROP - (Topic 4) 

You are developing an ASP.NET MVC application in Visual Studio 2012. The application will be viewed with browsers on desktop devices and mobile devices. The application uses the Razor View Engine to display data. 

The application contains two layouts located in the /Views/Shared directory. 

These layouts are named: 

. _Layout.cshmtl 

. _MobleLayoutcshtml 

The application must detect if the user is browsing from a mobile device. If the user is browsing from a mobile device, the application must use the _MobileLayout.cshtml file. If the user is browsing from a desktop device, the application must use .Layout, cs html. 

You need to ensure that the application renders the layout that is appropriate for the browser. 

You have the following code: 

Which code segments should you include in Target 1, Target 2 and Target 3 to complete the code of the ViewStart.cshtml file? (To answer, drag the appropriate code segments to the correct targets. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.) 

Answer: 


Q37. - (Topic 3) 

The transcode.exe utility activates its license online when it is installed. 

You need to ensure that the registration of the transcode utility is handled as specified in its 

license. 

Which method should you add to the TranscodeWorkerRole class? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:


Q38. HOTSPOT - (Topic 4) 

You are developing an ASP.NET MVC application that has pages for users who browse the site with Windows Phone 7. 

The pages for Windows Phone 7 include the following files: 

. _Layout.WP7.cshtml 

. Index.WP7.cshtml 

You need to update the application so that it renders the customized files correctly to Windows Phone 7 users. 

How should you update the Application_Start method? (To answer, select the appropriate option from the drop-down list in the answer area.) 

Answer: 


Q39. - (Topic 4) 

You are developing an ASP.NET MVC web application for viewing a list of contacts. The application is designed for devices that support changes in orientation, such as tablets and smartphones. The application displays a grid of contact tiles in portrait mode. 

When the orientation changes to landscape, each tile in the grid expands to include each contact's details. The HTML that creates the tiled interface resembles the following markup. 

The CSS used to style the tiles in landscape mode is as follows. 

If this CSS is omitted, the existing CSS displays the tiles in portrait mode. 

You need to update the landscape-mode CSS to apply only to screens with a width greater than or equal to 500 pixels. 

Which code segment should you use? 

A. @media screen and (width >= 500px) { … } 

B. @media screen and (min-width: 500px) { … } 

C. @media screen(min-width: 500px, max-width: 1000px) { … } 

D. @media resolution(min-width: 500px) { … } 

Answer:

Explanation: http://www.javascriptkit.com/dhtmltutors/cssmediaqueries.shtml 


Q40. - (Topic 4) 

You are developing an ASP.NET MVC application that uses forms authentication to verify that the user is logged in. 

Authentication credentials must be encrypted and secure so no user identity is exposed. 

You need to ensure that user credentials are persisted after users log on. 

Where should you store the credentials? (Each correct answer presents a complete solution. Choose all that apply.) 

A. In Session on the server 

B. In a cookie stored in the browser 

C. In ViewData in the application 

D. In TempData on the server 

Answer: A,B 



see more free 70-486 exam dumps