70-486 Dumps

70-486 Free Practice Test

Microsoft 70-486: Developing ASP.NET MVC 4 Web Applications

QUESTION 1

- (Exam Topic 4)
You need to ensure that URLs for log manipulation are mapped to the controller. You have the following code:
< ><>>< >
Solution:
Target 1: routes.MapRoute(
The MapRoute method takes three parameters: routes, name, and URL. Target 2: url: "GetLog/{action}/{id}",
Examplecode: routes.MapRoute( "Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller ="Home", action = "Index", id = "" } // Parameter defaults
);
Incorrect:
Not routes.MapHttpRoute(:
The MapHttpRoute method takes three parameters: routes, name, and routetemplate, but we need an URL parameter, not a routeTemplate parameter.
References:
https://msdn.microsoft.com/en-us/library/system.web.mvc.routecollectionextensions.maproute(v=vs.118).aspx https://msdn.microsoft.com/en-us/library/cc668201.aspx

Does this meet the goal?

Correct Answer: A

QUESTION 2

You need to update the routes to ensure that a product is always displayed on the product page. Which code segment should you use?

Correct Answer: B

QUESTION 3

- (Exam Topic 4)
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some questions sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You develop an ASP.NET web application that is self-hosted using Open Web Interface for .NET (OWIN) in a Microsoft Azure Worker role.
The web application throws exceptions. You need to resolve the exceptions.
Solution: Reference System.Web.dll to run in a custom host. Does the solution meet the goal?

Correct Answer: B

QUESTION 4

- (Exam Topic 4)
You are developing an ASP.NET Core MVC web application for AdventureWorks Cycles.
You need to ensure that users can authenticate with Contoso Ltd., an OpenID Connect authentication provider. How should you complete the code? To answer, drag the appropriate code segments to the correct locations.
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.
NOTE: Each correct selection is worth one point.

Solution:


Does this meet the goal?

Correct Answer: A

QUESTION 5

- (Exam Topic 4)
You are developing an ASP.NET MVC application. The application is deployed in a web farm and is accessed by many users.
The application must handle web server failures gracefully. The servers in the farm must share the short-term state information.
You need to persist the application state during the session. What should you implement?

Correct Answer: C
ASP.NET session state service provides a somewhat slower service than the in-process variant as we need to make calls to a remote server. All session data is stored in memory so shutting down the state machine will wipe out all session data as well.
References: https://dotnetcodr.com/2013/07/01/web-farms-in-net-and-iis-part-5-session-state-management/