Which code segments should you include in Target 1 and …

DRAG DROP
You need to ensure that URLs for log manipulation are mapped to the controller.
You have the following code:

Which code segments should you include in Target 1 and Target 2 to map the URLs? 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 need to drag the split bar between panes or scroll to view content.
Select and Place:

DRAG DROP
You need to ensure that URLs for log manipulation are mapped to the controller.
You have the following code:

Which code segments should you include in Target 1 and Target 2 to map the URLs? 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 need to drag the split bar between panes or scroll to view content.
Select and Place:

Answer:

Explanation:
Target 1: routes.MapRoute(
The MapRoute method takes three parameters: routes, name, and URL.
Target 2: url: “GetLog/{action}/{id}”,
Example code:
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.

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



Leave a Reply 7

Your email address will not be published. Required fields are marked *


Muthukumar

Muthukumar

Target 2 Should be :
url:”RunLog/{action}”,

Because GetLog is an action not controller

anon

anon

Agreed.

From the answer explanation’s example MapRoute code:

routes.MapRoute(
“Default”, // Route name
“{controller}/{action}/{id}”, // URL with parameters
new { controller =”Home”, action = “Index”, id = “” } // Parameter defaults);

The URL pattern is {controller}/{action}/{id}, so it has to be RunLog/{action}.

R

R

Agreed.

tjommi

tjommi

gut gut. Is correct. Very agreed

EYAuditor

EYAuditor

RunLog/{action}

Gaines

Gaines

New 70-486 Questions:

QUESTION 162
How could you traditionally consume an ASMX web service from your application? (Choose all that apply.)

A. Generate a proxy by selecting Add Reference In Visual Studio.
B. Create an HttpService and connect using Get(URL).
C. Generate a proxy by selecting Add A Service Reference in Visual Studio.
D. Create a WCF proxy class.

Answer: BC

QUESTION 163
You need to enable client-side validation for an ASP.NET MVC application.
Which three actions should you perform? Each correct answer presents part of the solution.

A. Attach a custom validation attribute to the model properties that the view uses.
B. Reference the jquery, jquery.validate and jquery.validate.unobtrusive script files in the view.
C. Open the web.config file at the project root, and set the values of the ClientValidationEnabled and UnobtrusiveJavaScriptEnabled keys to True.
D. For each form element, use the Validator.element() method to validate each item.
E. Add data annotations to the model properties that the view uses.

Answer: BCE
Explanation:

QUESTION 164
You are developing an ASP.NET MVC application.
The application provides a RESTful API for third-party applications. This API updates the information for a contact by embedding the information in the URL of an HTTP POST.
You need to save the Contact type when third-party applications use the EditContact method.
Which code segment should you use? {Each correct answer presents a complete solution.
Choose all that apply.)
164_thumb[1]

A. Option A
B. Option B
C. Option C
D. Option D

Answer: BD
Explanation:

QUESTION 165
Drag and Drop Question
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.
165_thumb[3]
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.
165-1_thumb[2]
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.
165-2_thumb[2]
Answer:
165-3_thumb[1]

QUESTION 166
Hotspot Question
You are developing an ASP.NET MVC application.
The application includes the following code. Line numbers are included for reference only.
166_thumb[1]
You add the following markup to the system.web section of the web.config file:
166-1_thumb[1]
For each of the following statements, select Yes if the statement is true. Otherwise, select No.
166-2_thumb[1]
Answer:
166-3_thumb[1]

QUESTION 167
You are developing an ASP.NET MVC application that will run on Azure.
The application uses Event Tracing for Windows (ETW) for logging operations.
You need to retrieve the ETW data for the application from a deployed Azure instance by using the Azure Diagnostics API.
Which data source should you use?

A. Azure Diagnostic infrastructure logs
B. Windows event logs
C. performance counters
D. .NET EventSource

Answer: D
Explanation:

QUESTION 168
Drag and Drop Question
You are developing an ASP.NET MVC application in a web farm. The application has a page that accepts a customer’s order, processes it, and then redirects the browser to a page where the order is displayed along with the shipping information.
The order information should be available only to the page where the order is displayed.
You need to store state and configure the application.
What should you do? To answer, drag the appropriate item to the correct location. Each item 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.
168_thumb[1]
Answer:
168-1_thumb[1]

QUESTION 169
You are implementing a website redesign of an existing website that provides historical weather condition maps. The current layout resembles the following graphic.
169_thumb[1]
Year selection is implemented as a set of links, which causes the page to reload when the user changes the year. The year selection HTML is contained in a div with an id of “year- changer”.
You need to modify the page so that the user can change the year without the page reloading. You also need to ensure that there is minimal change to the design of the page.
Which code segment should you use?
169-1_thumb[1]

A. Option A
B. Option B
C. Option C
D. Option D

Answer: B
Explanation:

QUESTION 170
You develop an ASP.NET MVC application. The application has a controller named PeopleController.cs. The controller has an action method that returns a parent view.
The parent view includes the following code. Line numbers are included for the reference only.
170_thumb[1]
The application also contains a partial view named People.
The parent view must display the partial view.
You need to add code at line 09 to display the partial view within the parent view.
Which two code segments will achieve the goal? Each correct answer presents a complete solution.

A. @{ Html.RenderPartial(“People”, Model);}
B. @Html.Partial(“People”, Model)
C. @Html.Display(“People”, Model)
D. @Html.Raw(“People”)

Answer: B
Explanation:

More 70-486 Practice Questions can be viewed at here: http://certforums.net/?s=70-486

EYAuditor

EYAuditor

RunLog/{action}