70-486 Developing ASP.NET MVC 4 Web Applications

Loading demo links...

Showing 4–6 of 15 questions

Question 4 (Mixed Questions)

HOTSPOT

You are developing an ASP.NET MVC application.

Before an action is executed, information about the action must be written to a log. After results are returned, information about the results also must be written to the log.

You need to log the actions and results.

You have the following code:

Which code segments should you include in Target 1, Target 2 and Target 3 to implement the LogActionFilter class? (To answer, select the appropriate option from the drop-down list in the answer area.) Hot Area:

Answer is in the explanation below.

Question 5 (Mixed Questions)

You are developing an ASP.NET web application.

You need to ensure that the application can securely render user-generated content.

What are two possible ways to achieve this goal? Each correct answer presents a complete solution.

NOTE: Each correct selection is worth one point.

Select all that apply, then click Submit answer.

  • Use the following code: var decodedUserInput = Server.UrlDecode(userInput);

  • Use the following WebForms markup:
    <%:userInput%>

  • Use the following Razor markup:
    @userInput

  • Use the following code:
    var decodedUserInput = Server.HtmlDecode(userInput);

Question 6 (Mixed Questions)

You are developing an ASP.NET MVC application. The application uses a SQL Server database and a SQL Server login and password.

You need to ensure that the password for the SQL Server login is not stored in plain text.

Which two actions should you perform? Each correct answer presents part of the solution.

NOTE: Each correct selection is worth one point.

Select all that apply, then click Submit answer.

  • Encrypt the connection string by using aspnet_wp.exe.

  • Encrypt the connection string by using aspnet_regiis.exe.

  • Ensure that there is a valid encryptionKey element in the web.config file.

  • Ensure that there is a valid machineKey element in the web.config file.