Welcome to TestSimulate

Pass Your Next Certification Exam Fast!

Everything you need to prepare, learn & pass your certification exam easily.

365 days free updates. First attempt guaranteed success.

Microsoft Developing ASP.NET MVC 4 Web Applications (070-486) Free Practice Test

Question 1
You are developing an ASP.NET MVC application in Visual Studio 2012. The application contains sensitive bank account data.
The application contains a helper class named SensitiveData.Helpers.CustomEncryptor.

The application must not display AccountNumber in clear text in any URL.
You need to build the view for the GetAccounts action.
How should you build the view? (To answer, drag the appropriate code segment to the correct location or 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.)
Correct Answer:
Question 2
You are developing an ASP.NET MVC application that displays stock market information.
The stock market information updates frequently and must be displayed in real-time.
You need to eliminate unnecessary header data, minimize latency, and transmit data over a full-duplex connection.
What should you do?

Correct Answer: D
Question 3
You are designing a distributed banking application that handles multiple customers. A user may log on to the site to perform activities such as checking balances, performing transactions, and other activities that must be done securely.
The application must store secure information that is specific to an individual user. The data must be automatically and securely purged when the user logs off.
You need to save transient information in a secure data store.
Which data store should you use?

Correct Answer: B
Question 4
You are developing an ASP.NET MVC application that uses forms authentication. The user database contains a user named LibraryAdmin.
You have the following requirements:

You need to implement the controller to meet the requirements.
Which code segment should you use? (Each correct answer presents a complete solution. Choose all that apply.)

Correct Answer: B,C
Question 5
You need to make all of the rows in the table bold in the Views/RunLog/GetLog.cshtml view.
Which code segment should you use?

Correct Answer: D
Question 6
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.)

Correct Answer: A,D
Question 7
You deploy an ASP.NET MVC Web application to Internet Information Services (IIS). The application has a secure area that provides access to custom reports.
You must develop custom business logic to support the reports. The custom business logic has the following requirements:

You must be able to quickly modify and deploy updates to the business logic.
You need to develop the custom business logic.
What should you do?

Correct Answer: B
Explanation: Only visible for TestSimulate members. You can sign-up / login (it's free).
Question 8
You are developing an ASP.NET MVC application that takes customer orders.
Orders are restricted to customers with IP addresses based in the United States.
You need to implement a custom route handler.
You have the following code:

Which code segments should you include in Target1, Target 2 and Target 3 to implement the route handler? 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.
NOTE: Each correct selection is worth one point.
Correct Answer:

Explanation:
Example:
This class implements IRouteHandler and has only one method "GetHttpHandler". The main purpose of this class is to return the instance of CustomHandler class. In the constructor, we are passing the RequestContext to the handler.
{
public class CustomRouteHandler : IRouteHandler
{
public IHttpHandler GetHttpHandler(RequestContext requestContext)
{
return new CustomHandler(requestContext);
}
}
References: http://msdn.microsoft.com/en-us/library/system.web.routing.iroutehandler.gethttphandler.aspx
Question 9
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: Use standard HttpModule and HttpHandler types.
Does the solution meet the goal?

Correct Answer: A
Explanation: Only visible for TestSimulate members. You can sign-up / login (it's free).
Question 10
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.)

Correct Answer: B,D
Explanation: Only visible for TestSimulate members. You can sign-up / login (it's free).
Question 11
You are developing an ASP.NET MVC application by using Visual Studio 2012.
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?

Correct Answer: D
Explanation: Only visible for TestSimulate members. You can sign-up / login (it's free).
Question 12
The date of the run must be displayed in Views\Runlog\GetLog.cshtml. The timestamp must not be displayed.
You need to display the date of the run according to the business requirements.
Which code segment should you use?

Correct Answer: A
Explanation: Only visible for TestSimulate members. You can sign-up / login (it's free).
Question 13
You are building an ASP.NET application. You develop the following unit test code. Line numbers are included for reference only.
01 [TestClass]
02 public class UnitTest1
03 {
04 protected string _name;
05 protected float _expenses;
06 protected float _income;
07 protected float _payment;
08 protected float _balance;
09 public void AddCustomer(string name, float income, float payment, float balance)
10 {
11 _name = name;
12 _expenses = expenses;
13 _income = income;
14 _payment = payment;
15 _balance = balance;
16 CheckName();
17 DebRatio();
18 CheckBalance();
19 }
20 [TestMethod]
21 public void CheckName()
22 {
23 Assert.IsNotNull(_name, "CheckName failed unit test");
24 }
25 [TestMethod]
26 public void DebRatio()
27 {
28 Assert.AreSame(_income, _payment, "DebRatio failed unit test");
29 }
30 [TestMethod]
31 public void CheckBalance()
32 {
33 Assert.IsTrue(_balance >= 0.0f, Check balance failed unit test.");
34 }
35}
You run the following line of code:
AddCustomer("Contoso", 0, 100, 100, -1);
You need to evaluate the unit test results. For each of the following statements, select Yes if the statement is true. Otherwise, select No.
Correct Answer:

Explanation:
Box 1: Yes
Line 23 is Assert.IsNotNull(_name, "CheckName failed unit test");
_name is "Contoso" so the assertion will succeed.
Box 2: No
Line 289 is Assert.AreSame(_income, _payment, "DebRatio failed unit test");
_income is 0 and payment is 100. The assertion will fail.
Box 3: No
Line 33 is Assert.IsTrue(_balance >= 0.0f, Check balance failed unit test.");
_balance is -1. The assertion will fail.
Question 14
You are developing an asynchronous HTTP module to write log messages. The logText variable stores the message that you must log.
You need to implement the asynchronous HTTP module.
Correct Answer: