70-486 Premium Bundle

70-486 Premium Bundle

Developing ASP.NET MVC 4 Web Applications Certification Exam

4.5 
(23565 ratings)
0 QuestionsPractice Tests
0 PDFPrint version
November 23, 2024Last update

Microsoft 70-486 Free Practice Questions

Q1. - (Topic 2) 

You need to configure session storage in the web.config file to meet the technical requirements for scalability. 

Which SessionState mode should you use? (Each correct answer presents a complete solution. Choose all that apply.) 

A. StateServer 

B. InProc 

C. AutoDetect 

D. SqlServer 

Answer: A,D 

Q2. DRAG DROP - (Topic 4) 

You are developing an ASP.NET MVC application that allows users to log on by using a third-party authenticator. 

You need to configure Microsoft Azure Access Control Services and the application. 

Which five actions should you perform in sequence? (To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.) 

Answer:  

Q3. DRAG DROP - (Topic 1) 

You need to implement security according to the business requirements. 

You have the following code: 

Which code segments should you include in Target 1, Target 2, Target 3 and Target 4 to modify RunLogController? To answer, drag the appropriate code segment 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. 

Answer:  

Q4. - (Topic 4) 

You are developing an ASP.NET MVC web application in Visual Studio 2012. The application requires several thousand content files. All content is hosted on the same IIS instance as the application. 

You detect performance issues when the application starts. 

You need to resolve the performance issues. 

What should you do? 

A. Enable compression in IIS. 

B. Move the content to a second server. 

C. Combine the content files by using ASP.NET MVC bundling. 

D. Implement HTTP caching in IIS. 

Answer:

Q5. HOTSPOT - (Topic 4) 

You are developing an ASP.NET MVC application that has pages for users who browse the site with Windows Phone 7. 

The pages for Windows Phone 7 include the following files: 

. _Layout.WP7.cshtml 

. Index.WP7.cshtml 

You need to update the application so that it renders the customized files correctly to Windows Phone 7 users. 

How should you update the Application_Start method? (To answer, select the appropriate option from the drop-down list in the answer area.) 

Answer:  

Q6. - (Topic 4) 

You are developing an ASP.NET MVC application that uses forms authentication to verify that the user is logged in. 

Authentication credentials must be encrypted and secure so no user identity is exposed. 

You need to ensure that user credentials are persisted after users log on. 

Where should you store the credentials? (Each correct answer presents a complete solution. Choose all that apply.) 

A. In Session on the server 

B. In a cookie stored in the browser 

C. In ViewData in the application 

D. In TempData on the server 

Answer: A,B 

Q7. - (Topic 3) 

You need to ensure that developers can connect to a Windows Azure role by using RDP. 

What should you do? 

A. Export a certificate without a private key. Upload the .cer file to the Management Certificates section on the Azure Management Portal. 

B. Export a certificate with a private key. Upload the .pfx file to the Management Certificates section on the Azure Management Portal. 

C. Export a certificate without a private key. Upload the .cer file to the Certificates section under the TranscodeWorkerRole hosted service on the Azure Management Portal. 

D. Export a certificate with a private key. Upload the .pfx file to the Certificates section under the TranscodeWorkerRole hosted service on the Azure Management Portal. 

Answer:

Q8. - (Topic 4) 

You are developing an ASP.NET MVC web application in Visual Studio 2012. The application requires several thousand content files. All content is hosted on the same IIS instance as the application. 

You detect performance issues when the application starts. 

You need to resolve the performance issues. 

What should you do? 

A. Implement HTTP caching in the ASP.NET MVC controllers. 

B. Combine the content files by using ASP.NET MVC bundling. 

C. Install a second IIS instance. 

D. Move the content to a Windows Azure CDN. 

Answer:

Q9. - (Topic 4) 

You are developing an ASP.NET MVC application in Visual Studio 2012. The application supports multiple cultures. 

The application contains three resource files in the Resources directory: 

My Dictionary.resx 

MyDictionary.es.resx 

MyDictionary.fr.resx 

Each file contains a public resource named Title with localized translation. 

The application is configured to set the culture based on the client browser settings. 

The application contains a controller with the action defined in the following code segment. (Line numbers are included for reference only.) 

You need to set ViewBag.Title to the localized title contained in the resource files. 

Which code segment should you add to the action at line 03? 

A. ViewBag.Title = HttpContext.GetGlobalResourceObuect("MyDictionary", "Title"); 

B. ViewBag.Title = HttpContext.GetGlobalResourceObject("MyDictionary", "Title", new System.Globalization.CultureInfo("en")); 

C. ViewBag.Title = Resources.MyDictionary.Title; 

D. ViewBag.Title = HttpContext.GetLocalResourceObject("MyDictionary", "Title"); 

Answer:

Q10. - (Topic 2) 

You need to modify the application to meet the productId requirement. Which code segment should you use? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:

Explanation: Scenario: The value of the productId property must always be greater than 0. 

Note: The Contract.Requires(Of TException) method specifies a precondition contract for the enclosing method or property, and throws an exception if the condition for the contract fails. Syntax: 'Declaration Public Shared Sub Requires(Of TException As Exception) ( _ condition As Boolean _) Type Parameters TException The exception to throw if the condition is false. Parameters condition Type: System.Boolean The conditional expression to test. 

Reference: Contract.Requires(Of TException) Method (Boolean) 

Q11. HOTSPOT - (Topic 4) 

You are developing an ASP.NET MVC application that authenticates a user by using claims-based authentication. 

The application must: 

. Use Windows Identity Foundation 4.5. 

. Support the Windows Azure Access Control Service. 

You need to implement authentication. 

How should you build the class constructor? (To answer, select the appropriate option from the drop-down list in the answer area.) 

Answer:  

Q12. - (Topic 4) 

You are developing an ASP.NET MVC web application for viewing a list of contacts. The application is designed for devices that support changes in orientation, such as tablets and smartphones. The application displays a grid of contact tiles in portrait mode. 

When the orientation changes to landscape, each tile in the grid expands to include each contact's details. The HTML that creates the tiled interface resembles the following markup. 

The CSS used to style the tiles in landscape mode is as follows. 

If this CSS is omitted, the existing CSS displays the tiles in portrait mode. 

You need to update the landscape-mode CSS to apply only to screens with a width greater than or equal to 500 pixels. 

Which code segment should you use? 

A. @media screen and (width >= 500px) { … } 

B. @media screen and (min-width: 500px) { … } 

C. @media screen(min-width: 500px, max-width: 1000px) { … } 

D. @media resolution(min-width: 500px) { … } 

Answer:

Explanation: http://www.javascriptkit.com/dhtmltutors/cssmediaqueries.shtml 

Q13. - (Topic 4) 

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. 

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:

Explanation: By default, any partial view rendered by calling @Html.Partial("PartialViewName") will get the view model passed to the parent view. 

Reference: How to populate mvc razor partial view 

http://stackoverflow.com/questions/13769707/how-to-populate-mvc-razor-partial-view 

Q14. - (Topic 4) 

You are developing an ASP.NET MVC application. 

You need to authenticate clients by using an ASP.NET membership database. 

Which authentication method should you implement? 

A. Kerberos 

B. Forms 

C. Basic 

D. Windows 

Answer:

Q15. HOTSPOT - (Topic 4) 

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.) 

Answer:  

Q16. DRAG DROP - (Topic 4) 

You are developing an ASP.NET MVC application in Visual Studio 2012. The application processes data for a bakery and contains a controller named BagelController.es that has several actions. The GetBagel action is defined in the following code segment. 

The GetBagel action is the only action that should be accessed via a URL pattern. Routes 

to the other actions in the controller must be suppressed. 

The default route must map to HomeController and the Index action. 

You need to build the routes. 

Which three code segments should you use in sequence? (To answer, move the 

appropriate actions from the list of actions to the answer area and arrange them in the 

correct order.) 

Answer:  

START 70-486 EXAM