70-486 Dumps

70-486 Free Practice Test

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

QUESTION 21

- (Exam Topic 4)
You are developing a .NET Core library that will be used by multiple applications. The library contains ASP.NET Core middleware named EnsureSecurityMiddleware.
EnsureSecurityMiddleware must always run prior to other middleware. You need to configure the middleware.
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 pint.

Solution:


Does this meet the goal?

Correct Answer: A

QUESTION 22

- (Exam Topic 4)
You have a class that includes the following code. (Line numbers are included for reference only.)
< ><>>< ><>>Which three actions should you perform? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.

Correct Answer: BEF
References: https://docs.microsoft.com/en-us/aspnet/core/security/authorization/roles?view=aspnetcore-2.1

QUESTION 23

- (Exam Topic 4)
You are developing a controller for an ASP.NET MVC application that manages blog postings. The security protection built in to ASP.NET is preventing users from saving their HTML.
You need to enable users to edit and save their HTML while maintaining existing security protection measures.
Which code segment should you use?
< ><>< >

Correct Answer: C
Example: ValidateInput at Action Method Level
The user can submit Html for this action method successfully with the following code. public class HomeController : Controller
{
public ActionResult AddArticle()
{
return View();
}
[ValidateInput(false)] [HttpPost]
public ActionResult AddArticle(BlogModel blog)
{
if (ModelState.IsValid)
{
}
return View();
}
}
References:
http://www.dotnettricks.com/learn/mvc/html-submission-by-validateinput-and-allowhtml-attribute-in-mvc4

QUESTION 24

- (Exam Topic 4)
You are developing an ASP.NET Core MVC web application. The application uses a custom tool named sectarget that performs security audits of the web application's assemblies. The custom tool was built in netstandardl.l and is packaged into a NuGet package named sectarget.
You need to ensure that the custom tool is run each time the web application is boat or published and that the latest version of sectarget is used each time the tool is run.
How should you complete the markup? To answer, drag the appropriate XML segments to the correct locations. Each XML 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 25

You need to implement client-side animations according to the business requirements.
Which line of code should you use? (Each correct answer presents a complete solution. Choose all that apply.)

Correct Answer: BC
From scenario: Information about the first product on the product page must fade out over time to encourage the user to continue browsing the catalog.