Recertification for MCSD: Web Applications

 

QUESTION 41

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.ex
e

 

Correct Answer: B

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

 

 

QUESTION 42

DRAG DROP

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

 

The application has a model named ReservationLocation that contains properties named City and State.

 

The view that displays reservations has a single text box named loc for entering the location information. The location is entered as city, state.

 

There are action methods that have ReservationLocation as a parameter type.

 

You need to ensure that the City and State properties are correctly populated.

 

How should you implement model binding for the ReservationLocation type?

 

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.

 

clip_image001

 

Correct Answer:

clip_image002

 

 

 

 

 

 

 

 

 

QUESTION 43

HOTSPOT

You are developing an ASP.NET MVC application.

 

You need to store membership information in a Microsoft SQL Server database.

 

How should you configure the membership provider?

 

To answer, select the appropriate options in the answer area.

 

clip_image004

 

Correct Answer:

clip_image006

 

 

QUESTION 44

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?

 

clip_image008

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D

 

Correct Answer: D

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

 

 

QUESTION 45

You are developing an application that uses many small images.

 

When the images load, the application runs slowly.

 

You need to improve the performance of the application.

 

What should you do?

 

A.

Preload all the images when the application starts to ensure that the images are cached.

B.

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

C.

Host all images on a Microsoft Azure web role with multiple instances.

D.

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

 

Correct Answer: D

Explanation:

Because browsers limit how many concurrent HTTP requests they make to a website, a web page with many small icon images can result in a longer load time. You can combine many small images into a single larger image – a CSS sprite – using the free ASP.NET Sprite and Image Optimization Library available from Microsoft.

 

Reference:

CSS Sprites and the ASP.NET Sprite and Image Optimization Library

http://dotnetslackers.com/articles/aspnet/CSS-Sprites-and-the-ASP-NET-Sprite-and-Image-Optimization-Library.aspx

 

 

QUESTION 46

DRAG DROP

You are building an ASP.NET MVC web application.

 

The application will be viewed by users on their mobile phones.

 

You need to ensure that the page fits within the horizontal width of the device screens.

 

You have the following markup:

 

clip_image010

 

Which markup segments should you include in Target 1, Target 2 and Target 3 to complete the markup?

 

To answer, drag the appropriate markup segments to the correct targets. 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.

 

clip_image012

 

Correct Answer:

clip_image014

 

 

 

 

 

 

 

 

 

 

QUESTION 47

You are developing an ASP.NET MVC web application that includes the following method.

 

clip_image016

 

You need to test the AccountBalance method.

 

Which unit test should you use?

 

clip_image018

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D

 

Correct Answer: C

Explanation:

http://msdn.microsoft.com/en-us/magazine/cc163665.aspx

http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.testtools.unittesting.assert.areequal(v=vs.110).aspx

 

 

QUESTION 48

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

 

clip_image020

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D

 

Correct Answer: BD

Explanation:

Basics of RESTful services:

REST stands for Representational State Transfer, it is a simple stateless architecture that runs over HTTP where each unique URL is representation of some resource. There are four basic design principles which should be followed when creating RESTful service:

Use HTTP methods (verbs) explicitly and in consistent way to interact with resources (Uniform Interface), i.e. to retrieve a resource use GET, to create a resource use POST, to update a resource use PUT/PATCH, and to remove a resource use DELETE.

Etc.

 

QUESTION 49

HOTSPOT

You are optimizing an Internet-facing website for search engine optimization.

 

You are reading a Site Analysis Report from the SEO Toolkit. The report returns warnings that indicate the website HTML lacks key information necessary for search engine indexing.

 

You need to improve the optimization of the site.

 

What should you do?

 

To answer, select the appropriate option from the drop-down list in the answer area.

 

clip_image022

 

Correct Answer:

clip_image024

QUESTION 50

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:

< font style="font-size: 10pt" color="#000000"> 

clip_image026You must allow all users to access the GetBook method.

clip_image026[1]You must restrict access to the EditBook method to the user named LibraryAdmin.

 

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

 

clip_image028

clip_image030

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D

 

Correct Answer: AC

 

Free VCE & PDF File for Microsoft 70-494 Actual Tests

Instant Access to Free VCE Files: MCSE|MCSA|MCITP…
Instant Access to Free PDF Files: MCSE|MCSA|MCITP…