70-486 Premium Bundle

70-486 Premium Bundle

Developing ASP.NET MVC 4 Web Applications Certification Exam

4.5 
(33585 ratings)
0 QuestionsPractice Tests
0 PDFPrint version
November 21, 2024Last update

Microsoft 70-486 Free Practice Questions

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

Q2. 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:  

Q3. - (Topic 4) 

You are developing an ASP.NET MVC application that supports multiple cultures and multiple languages. The application will be sold to international customers. 

The ASP.NET MVC application must store localized content in satellite assemblies for multiple languages. 

You need to generate the satellite assemblies during an automated build. 

Which tool should you use? 

A. Gacutil.exe 

B. Al.exe 

C. Ildasm.exe 

D. nasm.exe 

Answer:

Explanation: Use the Assembly Linker (Al.exe) to compile .resources files into satellite assemblies. Al.exe creates an assembly from the .resources files that you specify. By definition, satellite assemblies can only contain resources. They cannot contain any executable code. 

The following Al.exe command creates a satellite assembly for the application MyApp from the file strings.de.resources. 

al /t:lib /embed:strings.de.resources /culture:de /out:MyApp.resources.dll 

Q4. - (Topic 4) 

You are preparing for the deployment of an ASP.NET MVC application. You need to generate a deployment manifest. 

Which command-line tool should you use? 

A. Mage.exe 

B. Ngen.exe 

C. ALexe 

D. Resgen.exe 

Answer:

Explanation: Al.exe generates a file with an assembly manifest from one or more files that are either resource files or Microsoft intermediate language (MSIL) files. 

Q5. - (Topic 3) 

Customers download videos by using HTTP clients that support various content encodings. You need to configure caching on the DownloadVideo action to maximize performance. Which attribute should you add? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

E. Option E 

Answer:

Q6. DRAG DROP - (Topic 4) 

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. 

How should you implement the route handler? (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:  

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

You need to modify the application to meet the productId requirement. 

What should you do? 

A. Modify the RegisterGlobalFilters method of the Global.asax.cs file as follows. Contract.Assume<ArgumentException>(productId != 0); 

B. Modify the GetDealPrice method of ProductController as follows. Contract.Requires<ArgumentException>(productId > 0); 

C. Modify the RegisterGlobalFilters method of the Global.asax.cs file as follows. Contract.Requires<ArgumentException>(productId > 0); 

D. Modify the GetDealPrice method of ProductController as follows. Contract.Assume<ArgumentException>(productId > 0); 

Answer:

Explanation: 

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) 

Q9. 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:  

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

Q11. - (Topic 3) 

You need to ensure that all the MVC controllers are secure. 

Which code segment should you use as the body for the CreateController method in AdminVerifierFactory.es? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:

Q12. DRAG DROP - (Topic 4) 

You are developing an ASP.NET MVC application in Visual Studio. 

The application contains an area that is defined as shown in the following graphic. 

The ActionLink method must invoke the GetOrders() action in ExternalOrderController. 

You need to configure the parameters of the ActionLink method. 

You have the following markup. 

Which markup segments should you include in Target 1, Target 2 and Target 3 to complete the markup? To answer, drag the appropriate markup segment to the correct targets. Each markup 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:  

Q13. - (Topic 4) 

You need to enable client-side validation for an ASP.NET MVC application. 

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

A. Attach a custom validation attribute to the model properties that the view uses. 

B. Reference the jquery, jquery.validate and jquery.validate.unobtrusive script files in the view. 

C. Open the web.config file at the project root, and set the values of the ClientValidationEnabled and UnobtrusiveJavaScriptEnabled keys to True. 

D. For each form element, use the Validator.element() method to validate each item. 

E. Add data annotations to the model properties that the view uses. 

Answer: B,C,E 

Explanation: B: . The validation can be implemented using jQuery and jQuery validation plug-in (jquery.validate.min.js and jquery.validate.unobtrusive.min.js). 

C: When you are developing an MVC application in Visual Studio 2012 then the client-side 

becomes enabled by default, but you can easily enable or disable the writing of the 

following app setting code snippet in the web.config file. 

<configuration> 

<appSettings> 

<add key="ClientValidationEnabled" value="true" /> 

<add key="UnobtrusiveJavaScriptEnabled" value="true" /> 

</appSettings> 

</configuration> 

E: The jQuery validation plug-in takes advantage of the Data Annotation attributes defined in the model, which means that you need to do very little to start using it. 

Reference: ASP.NET MVC Client Side Validation 

http://www.codeproject.com/Articles/718004/ASP-NET-MVC-Client-Side-Validation 

Q14. - (Topic 4) 

You are developing an Azure worker role. You enable crash dump collection for the role. 

When the role starts, an external application stops responding. 

You need to download the crash dump to determine why the application stops responding. 

From which two locations can you download the crash dump? Each correct answer presents a complete solution. 

A. Azure Blob storage 

B. the temp folder on the virtual machine that is running the role instance 

C. Azure file storage 

D. the DiagnosticStore local resource folder on the virtual machine that is running the role instance 

Answer: A,D 

Explanation: When you enable collection of crash dumps, the resulting data is written to the CrashDumps directory in the DiagnosticStore local resource that is automatically configured for your role. When crash dump data is transferred to persistent storage, it is stored to the wad-crash-dumps Blob container. 

Reference: CrashDumps.EnableCollection Method 

https://msdn.microsoft.com/library/microsoft.windowsazure.diagnostics.crashdumps.enable collection.aspx 

Q15. - (Topic 3) 

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

A. Create a class derived from ActionResult and check for a valid HTTP header value in the ExecuteResult method. Change all actions to return this new class. 

B. Create an HttpHandler to check for a valid HTTP header value in the ProcessRequest method. 

C. Create an HttpModule and check for a valid HTTP header value in the AuthenticateRequest event. 

D. Create a class derived from AuthorizeAttribute and check for a valid HTTP header value in the AuthorizeCore method. Change usages of the existing AuthorizeAttribute to use the new class. 

Answer: C,D 

Q16. DRAG DROP - (Topic 3) 

You need to ensure that the transcode.exe utility is installed before the worker role starts. You have the following markup: 

Which markup segments should you include in Target 1, Target 2, Target 3, Target 4 and Target 5 to implement the startup task? To answer, drag the appropriate markup segments to the correct targets. Each markup segments 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:  

Topic 4, Mixed Questions 

START 70-486 EXAM