70-486 Premium Bundle

70-486 Premium Bundle

Developing ASP.NET MVC 4 Web Applications Certification Exam

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

Microsoft 70-486 Free Practice Questions

Q1. - (Topic 4) 

You are developing an ASP.NET MVC application that uses forms authentication against an Oracle database. 

You need to authenticate the users. Which code segment should you use? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:

Explanation: When implementing a custom membership provider, you are required to inherit the MembershipProvider abstract class. There are two primary reasons for creating a custom membership provider. You need to store membership information in a data source that is not supported by the membership providers included with the .NET Framework, such as a FoxPro database, an Oracle database, or other data source. You need to manage membership information using a database schema that is different from the database schema used by the providers that ship with the .NET Framework. A common example of this would be membership data that already exists in a SQL Server database for a company or Web site. 

Reference: MembershipProvider Class 

https://msdn.microsoft.com/en-us/library/system.web.security.membershipprovider(v=vs.110).aspx 

Q2. HOTSPOT - (Topic 3) 

The designer for the website gave you the following image as the design for the page. 

The normal color for the tab is *2da4c2, and the color when the mouse is over the tab is #ffd800. 

The HTML that implements the navigation tab is as follows. 

You need to implement the design. 

What should you do? (To answer, select the appropriate options in the answer area.) 

Answer:  

Q3. - (Topic 4) 

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

When the orientation changes to landscape, each tile in the grid expands to include a description. The HTML that creates the gallery interface resembles the following markup. 

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

You need to update the portrait mode CSS to apply only to screens with a width less than 500 pixels. 

Which code segment should you use? 

A. @media resolution(max-width: 500px) { 

. . . 

B. @media screen(min-width: Opx, max-width: 500px) { 

. . . 

C. @media screen and (width <= 500px) { 

. . . 

D. @media screen and (max-width: 500px) { 

. . . 

Answer:

Q4. - (Topic 4) 

You are developing an ASP.NET MVC application that will be deployed to servers on multiple networks. 

The application must be compatible with multiple browsers. You must track the page number that the user is viewing in search results. 

You need to program the location for storing state information. 

Where should you persist state information? 

A. Session 

B. QueryString 

C. Application 

D. TempData 

Answer:

Q5. DRAG DROP - (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, drag the appropriate line of code to the correct location or locations. Each line of code 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:  

Q6. - (Topic 4) 

You are developing an ASP.NET MVC application that will be deployed on a web farm. 

Passwords must be stored in the web.config file and must not be readable or in a format 

that is easily decodable 

You need to encrypt the passwords that are stored in the web.config file. 

Which command-line tool should you use? 

A. Aspnet_regiis.exe 

B. Ngen.exe 

C. Aspnet_merge.exe 

D. EdmGen.exe 

Answer:

Explanation: http://msdn.microsoft.com/en-us/library/zhhddkxy(v=vs.100).aspx 

Q7. - (Topic 2) 

You need to ensure that new customers enter a valid email address. 

Which code should you use? (Each correct answer presents part of the solution. Choose all that apply.) 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer: A,D 

Q8. HOTSPOT - (Topic 4) 

You are using the features of the IIS SEO Toolkit to configure the website. You need to exclude search engines from indexing parts of website. 

What should you do? (To answer, select the appropriate option from the drop-down list in the answer area.) 

Answer:  

Q9. - (Topic 4) 

You are developing an application that uses many small images for various aspects of the interface. 

The application responds slowly when additional resources are being accessed. 

You need to improve the performance of the application. 

What should you do? 

A. Preload all the images when the client connects to ensure that the images are cached. 

B. Combine all the images into a single image and use CSS to create sprites. 

C. Host all images on an alternate server and provide a CDN. 

D. Convert the images to .png file format and stream all images on a single connection. 

Answer:

Q10. - (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:

Q11. - (Topic 4) 

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? 

A. NET session state 

B. NET profile properties 

C. NET application state 

D. Shared database 

Answer:

Q12. - (Topic 2) 

You need to update the routes to ensure that a product is always displayed on the product page. 

Which code segment should you use? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:

Q13. - (Topic 4) 

You are developing an ASP.NET MVC application that enables you to edit and save a 

student object. 

The application must not retrieve student objects on an HTTP POST request. 

You need to implement the controller. 

Which code segment should you use? (Each correct answer presents a complete solution. 

Choose all that apply.) 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer: C,D 

Q14. - (Topic 4) 

You are developing an ASP.NET MVC application by using Visual Studio. 

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? 

A. Add the following code to the web.config file of the application. 

<customErrors mode=”On” > 

<error statusCode=”404” redirect=”CustomErrors.html” /> 

</customErrors> 

B. From the Debug menu in Visual Studio, select Exceptions. Disable the User-unhandled 

check box for Common Language Runtime Exceptions. 

C. Add the following code to the web.config file of the application. 

<customErrors mode=“On” > 

<error statusCode=”500” redirect=”CustomErrors.html” /> 

</customErrors> 

D. From the Debug menu in Visual Studio, select Exceptions. Enable the Thrown check 

box for Common Language Runtime Exceptions. 

Answer:

Explanation: Configuring the debugger to break for first chance exceptions 

To change when the debugger breaks, go to Debug->Exceptions… 

When you first open this window you will see that there is a tree grid with one column and checkboxes. 

Break when Thrown. This includes a default list of exceptions known by the debugger, 

grouped by category. 

Note: The possible exceptions that could break from this list is determined by the runtime 

you are debugging. For example, if you are using managed-only debugging then the 

debugger will never break for C++, Win32 Exceptions, etc. even if they are configured to 

break when thrown. 

Checkboxes. If you check the box for a category, then the debugger will break for all First 

Chance Exceptions while debugging. If you don’t want to enable all First Chance 

Exceptions, you can find the specific exception types that you wish to configure by using 

the search box. 

Reference: Understanding Exceptions while debugging with Visual Studio 

http://blogs.msdn.com/b/visualstudioalm/archive/2015/01/08/understanding-exceptions-while-debugging-with-visual-studio.aspx 

Q15. DRAG DROP - (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. 

You have the following code: 

Which code segments should you include in Target 1, Target 2, Target 3 and Target 4 to build the class constructor? To answer, drag the appropriate code segment to the correct targets in the answer area. 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:  

Q16. HOTSPOT - (Topic 4) 

You are developing an ASP.NET MVC application. The layout page of the application references the jQuery library. You develop a view that uses the layout page. The view includes the following markup: 

The application includes the following class: 

When a user clicks the button, an AJAX call must retrieve the partial view and append it to the newBooks div element. 

You need to implement the AJAX request. 

How should you complete the relevant code? To answer, select the appropriate code segment from each list in the answer area. 

Answer:  

START 70-486 EXAM