BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time...

174
BrainDumps.70-486.154.QA Number : 70-486 Passing Score : 800 Time Limit : 120 min File Version : 21.14 70-486 Developing ASP.NET MVC 4 Web Applications 1. Created Questions into Sections, now we can learn by Sections with this help. 2. This is the best VCE I ever made. Try guys and if any suggestion please update this. 3. Added Explanations and Exhibits most of the questions. 4. Fixed the Exhibit size and Drag drops/hot spot questions. 5. Still valid , Hurry up guys study and pass this one.

Transcript of BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time...

Page 1: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

BrainDumps.70-486.154.QA

Number: 70-486Passing Score: 800Time Limit: 120 minFile Version: 21.14

70-486

Developing ASP.NET MVC 4 Web Applications

1. Created Questions into Sections, now we can learn by Sections with this help.2. This is the best VCE I ever made. Try guys and if any suggestion please update this.3. Added Explanations and Exhibits most of the questions.4. Fixed the Exhibit size and Drag drops/hot spot questions.5. Still valid , Hurry up guys study and pass this one.

Page 2: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Testlet 1

Olympic Marathon

BackgroundYou are developing an ASP.NET MVC application in Visual Studio 2012 that will be used by Olympic marathonrunners to log data about training runs.

Business Requirements

The application stores date, distance, and duration information about a user's training runs. The user can view,insert, edit, and delete records.

The application must be optimized for accessibility.

All times must be displayed in the user's local time.

Technical Requirements

Data Access:Database access is handled by a public class named RunnerLog.DataAccess.RunnerLogDb.All data retrieval must be done by HTTP GET and all data updates must be done by HTTP POST.

Layout:All pages in the application use a master layout file named \Views\Shared\_Layout.cshtml.

Models:The application uses the \Models\LogModel.cs model.

Views:All views in the application use the Razor view engine.

Four views located in \Views\RunLog are named: _CalculatePace.cshtmlEditLog.cshtmlGetLog.cshtmlInsertLog.cshtml

The application also contains a \Views\Home\Index.cshtml view.

Controllers:The application contains a \Controllers\RunLogController.cs controller.

Images:A stopwatch.png image is located in the \Images folder.

Videos:A map of a runner's path is available when a user views a run log. The map is implemented as an Adobe Flashapplication and video. The browser should display the video natively if possible, using H264, Ogg, or WebMformats, in that order. If the video cannot be displayed, then the Flash application should be used.

Security:You have the following security requirements: The application is configured to use forms authentication.

Page 3: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Users must be logged on to insert runner data.Users must be members of the Admin role to edit or delete runner data.There are no security requirements for viewing runner data.You need to protect the application against cross-site request forgery.Passwords are hashed by using the SHA1 algorithm.

RunnerLog.Providers.RunLogRoleProvider.es contains a custom role provider.

Relevant portions of the application files follow. (Line numbers are included for reference only.)

Application Structure

Page 4: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications
Page 5: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications
Page 6: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications
Page 7: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

QUESTION 1You need to implement the Views\RunLog\_CalculatePace.cshtml partial view from Views\Runlog\GetLog.cshtml to display the runner's average mile pace.

How should you implement the view? (To answer, drag the appropriate code segments to the correct locationor locations. Each code segment may be used once, more than once, or not at all. You may need to drag thesplit bar between panes or scroll to view content.)

Select and Place:

Page 8: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Correct Answer:

Section: [none]

Page 9: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Explanation

Explanation/Reference:

QUESTION 2You need to implement security according to the business requirements.

How should you modify RunLogController? (To answer, drag the appropriate code segment to the correctlocation or locations. Each code segment may be used once, more than once, or not at all. You may need todrag the split bar between panes or scroll to view content.)

Select and Place:

Correct Answer:

Page 10: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Section: [none]Explanation

Explanation/Reference:

QUESTION 3You need to implement the map of the runners' paths.

How should you build the video viewer? (To answer, select the appropriate options in the answer area.)

Hot Area:

Page 11: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications
Page 12: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Correct Answer:

Page 13: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications
Page 14: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Section: [none]Explanation

Explanation/Reference:

QUESTION 4If the canvas element is supported by the client browser, the application must display "London 2012" in thefooter as text formatted by JavaScript at the end of the _Layout.cshtml file.

You need to modify the layout to ensure that "London 2012" is displayed as either formatted text or as plaintext, depending on what the client browser supports.

Which code segment should you add?

A. <canvas id="myFooter">@(Request,Browser.JavaApplets ? new HtmlString("London 2012") : null) </canvas>

B. <canvas id="myFooter"London 2012</canvas>

C. <canvas id="myCanvas">London 2012</canvas>

D. <canvas id="myCanvas"><canvas><p>London 2012</p>

Correct Answer: CSection: [none]Explanation

Explanation/Reference:

QUESTION 5You need to add an action to RunLogController to validate the users' passwords.

Which code segment should you use?

Page 15: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

A. Option A

B. Option B

C. Option C

D. Option D

Correct Answer: BSection: [none]Explanation

Explanation/Reference:

Page 16: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

QUESTION 6You need to make all of the rows in the table bold in the Views/RunLog/GetLog.cshtml view.

Which code segment should you use?

A. Table > th:last-child { font-weight: bold; }

B. Table+first-child{ font-weight: bold; }

C. Table>tr>th:nth-child{2){font-weight: bold; }

D. Table > tr {font-weight: bold;}

Correct Answer: DSection: [none]Explanation

Explanation/Reference:valid and updated.

QUESTION 7You need to display the "miles" unit description after the distance in the GetLog view.

Which line of code should you use to replace line GL21? (Each correct answer presents a complete solution.Choose all that apply.)

A. @log.Distance miles

B. @Htrml.DisplayFor(model => log.Distance) miles

C. @log.Distance.ToStringO @Html.TextArea ("miles")

D. @Htmi.DisplayFor(model => log.Distance.ToString() + " miles")

Correct Answer: ABSection: [none]Explanation

Explanation/Reference:Topic 2, Web Application

BackgroundYou are developing an online shopping web application.Business RequirementsA user is not required to provide an email address. If a user enters an email address, it must be verified to be avalid email address. Information about the first product on the product page must fade out over time toencourage the user to continue browsing the catalog.Administrators must be able to edit information about existing customers.Administrators also must be able to specify a default product on the product page.

Technical Requirements

General:The web store application is in a load-balanced web farm. The load balancer is not configured to use serveraffinity.The web store application is an ASP.NET MVC application written in Visual Studio 2012.Products:The value of the productId property must always be greater than 0. The Products page for mobile devices mustdisplay to mobile users. The Products page for desktop devices must display to desktop users.

Storage:The data must be stored in a serialized XML data format.Serialized objects must be schema-independent.

Page 17: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Exception handling:Exceptions originating from IIS must display a page with support contact information.Some page links expire, and users who access these links encounter 404 errors.Exceptions must be logged by using the WriteLog method of the Utility class.

Browser and device support:The application must support image format conversions from .bmp to .jpeg for mobile devices.The application must support image format conversions from .bmp to .png for desktop devices.

Application Structure

Page 18: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

QUESTION 8You need to ensure that only valid parameters are passed to the EditLog action.

How should you build the route? (To answer, select the appropriate options in the answer area.)

Page 19: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Hot Area:

Page 20: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications
Page 21: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Correct Answer:

Page 22: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications
Page 23: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Section: [none]Explanation

Explanation/Reference:

QUESTION 9You need to ensure that the application uses RunLogRoleProvider custom role provider.

How should you modify the web.config file? (To answer, drag the appropriate line of code to the correct locationor locations. Each line of code may be used once, more than once, or not at all. You may need to drag the splitbar between panes or scroll to view content.)

Select and Place:

Correct Answer:

Page 24: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Section: [none]Explanation

Explanation/Reference:

QUESTION 10You need to ensure that only valid parameters are passed to the EditLog action.

How should you build the route? (To answer, drag the appropriate code segments to the correct location orlocations. Each code segment may be used once, more than once, or not at all. You may need to drag the splitbar between panes or scroll to view content.)

Select and Place:

Correct Answer:

Page 25: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Section: [none]Explanation

Explanation/Reference:

QUESTION 11You need to make the "Distance" header of the table bold in the Views/RunLog/GetLog.cshtml view.

Which code segment should you use?

A. table>tr{ font-weight: bold; }

B. table>th:last-child{ font-weight: bold; }

C. table+first-child{ font-weight: bold; }

D. table>tr>th:nth-child (2) { font-weight: bold; }

Correct Answer: D

Page 26: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Section: [none]Explanation

Explanation/Reference:

QUESTION 12You need to extend the edit functionality of RunLogController.

Which code segment should you use?

Page 27: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

A. Option A

B. Option B

C. Option C

D. Option D

Correct Answer: CSection: [none]Explanation

Page 28: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Explanation/Reference:

Page 29: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Testlet 1

Web Application

BackgroundYou are developing an online shopping web application.

Business RequirementsA user is not required to provide an email address. If a user enters an email address, it must be verified to be avalid email address.Information about the first product on the product page must fade out over time to encourage the user tocontinue browsing the catalog.Administrators must be able to edit information about existing customers.Administrators also must be able to specify a default product on the product page.

Technical Requirements

General:The web store application is in a load-balanced web farm. The load balancer is not configured to use serveraffinity.The web store application is an ASP.NET MVC application written in Visual Studio 2012.Products:The value of the productId property must always be greater than 0.The Products page for mobile devices must display to mobile users. The Products page for desktop devicesmust display to desktop users.

Storage:The data must be stored in a serialized XML data format.Serialized objects must be schema-independent.

Exception handling:Exceptions originating from IIS must display a page with support contact information.Some page links expire, and users who access these links encounter 404 errors.Exceptions must be logged by using the WriteLog method of the Utility class.

Browser and device support:The application must support image format conversions from .bmp to .jpeg for mobile devices.The application must support image format conversions from .bmp to .png for desktop devices.

Application Structure

Page 30: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications
Page 31: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications
Page 32: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

QUESTION 1You 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.)

Page 33: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

A. Option A

B. Option B

C. Option C

D. Option D

Correct Answer: ADSection: [none]Explanation

Explanation/Reference:

QUESTION 2You are designing a Windows Communication Foundation (WCF) service that uses the Product class.You need to update the class to meet the storage requirement.

What should you do? (Each correct answer presents part of the solution. Choose all that apply.)

A. Mark the Product class with the DataContract attribute.

B. Mark the public members of the Product class with the DataContractFormat attribute.

C. Mark the Product class with the CollectionDataContract attribute.

D. Mark the public members of the Product class with the DataMember attribute.

Correct Answer: ADSection: [none]Explanation

Explanation/Reference:So as of .NET 3.5 SP1, you don't have to add data contract or data member attributes anymore - if you don'tthen the data contract serializer will serialize all public properties on your class, just like the XML serializerwould.HOWEVER: by not adding those attributes, you lose a lot of useful capabilities:without [DataContract], you cannot define an XML namespace for your data to live inwithout [DataMember], you cannot serialize non-public properties or fields without [DataMember], you cannotdefine an order of serialization (Order=) and the DCS will serialize all properties alphabetically without[DataMember], you cannot define a different name for your property (Name=)without [DataMember], you cannot define things like IsRequired= or other useful attributes

Page 34: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

without [DataMember], you cannot leave out certain public properties - all public properties will be serialized bythe DCS

QUESTION 3You need to implement the requirements for handling IIS errors.

What should you do?

A. Option A

B. Option B

C. Option C

D. Option D

Correct Answer: ASection: [none]Explanation

Explanation/Reference:

QUESTION 4You need to add a method to the ProductController class to meet the exception handling requirements forlogging.

Which code segment should you use?

A. Option A

B. Option B

C. Option C

D. Option D

Correct Answer: ASection: [none]Explanation

Explanation/Reference:

QUESTION 5An advertising campaign was recently launched. Some of the ads contain a link to products that no longer existor have IDs that have changed.

You need to ensure that all product links display a product.

Which code segment should you use to configure the route?

Page 35: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

A. Option A

B. Option B

C. Option C

D. Option D

Correct Answer: ASection: [none]Explanation

Explanation/Reference:

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

What should you do?

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

Page 36: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

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

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

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

Correct Answer: BSection: [none]Explanation

Explanation/Reference:The Contract.Requires(Of TException) method specifies a precondition contract for the enclosing method orproperty, and throws an exception if the condition for the contract fails.Syntax:'DeclarationPublic Shared Sub Requires(Of TException As Exception) ( _ condition As Boolean _)Type ParametersTExceptionThe exception to throw if the condition is false.ParametersconditionType: System.BooleanThe conditional expression to test.

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

QUESTION 7You need to implement the business requirements for managing customer data.

What should you do? (Each correct answer presents part of the solution. Choose all that apply.)

A. Add a class named Customer-Controller to the Controllers folder. Then add a method named Edit to theclass.

B. Create a new controller named Administration in the Controllers folder. Add an action named EditCustomerto the controller.

C. Add a folder named Customer to the Views folder. Then create a view inside this folder named Edit.aspx.

D. Create a new folder named EditCustomer to the Views folder. In the new folder, create a new file namedAdministration.aspx.

Correct Answer: ABSection: [none]Explanation

Explanation/Reference:

QUESTION 8When users attempt to retrieve a product from the product page, a run-time exception occurs if the productdoes not exist.

You need to route the exception to the CustomException.aspx page.

Which method should you add to MvcApplication?

Page 37: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

A. Option A

B. Option B

C. Option C

D. Option D

Correct Answer: BSection: [none]Explanation

Page 38: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Explanation/Reference:

QUESTION 9You updated the web.config file with the HTTP run-time value required to display an alternative version of thesite.

You need to ensure that the correct page displays to the users. Which code segment should you use to updatethe controller?

A. If (Request.IsTabletDevice)

B. If (Request.Browser.IsBrowser("Mobile"))

C. If (Request.UserAgent["Tablet"])

D. If (Request.Browser.IsMobileDevice)

Correct Answer: DSection: [none]Explanation

Explanation/Reference:

QUESTION 10You need to implement client-side animations according to the business requirements.

Which line of code should you use? (Each correct answer presents a complete solution. Choose all that apply.)

A. $("body h1:nth-child(1)").fadeIn(1000);

B. $("body h1:nth-child(1)")-fadeOut(1000);

C. $("body h2:nth-child(1)").animate({ opacity: 0 });

D. $("body h1:nth-child(1)").animate({ opacity: 1 });

Correct Answer: BCSection: [none]Explanation

Explanation/Reference:

QUESTION 11You need to implement client-side animations according to the business requirements.

Which line of code should you use? (Each correct answer presents a complete solution. Choose all that apply.)

A. $ ("h1: first") .animate ({ opacity: 0 });

B. $("h1:first").fadeIn(1000);

C. $("h1:first").animate({ opacity: 1 });

D. $("h1:first").fadeOut(1000);

Correct Answer: ADSection: [none]Explanation

Explanation/Reference:

Page 39: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

QUESTION 12You 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

Correct Answer: ADSection: [none]Explanation

Explanation/Reference:

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

Which code segment should you use?

Page 40: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

A. Option A

B. Option B

C. Option C

D. Option D

Correct Answer: BSection: [none]Explanation

Explanation/Reference:

QUESTION 14The GetDealPrice method must be called by using Ajax.

You need to get the price of a product by using the GetDealPrice method of the ProductController.

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

Page 41: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

A. Option A

B. Option B

C. Option C

D. Option D

Correct Answer: CDSection: [none]Explanation

Explanation/Reference:corrected.

QUESTION 15You need to implement the mobile device support requirements.

How should you build the ProcessRequest method? (To answer, select the appropriate options in the answerarea.)

Hot Area:

Page 42: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications
Page 43: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Correct Answer:

Page 44: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications
Page 45: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Section: [none]Explanation

Explanation/Reference:

Page 46: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Testlet 1

Video Transcoding Service

BackgroundYou are developing a video transcoding service. This service is used by customers to upload video files,convert video to other formats, and view the converted files. This service is used by customers all over theworld.

Business Requirements

The user-facing portion of the application is an ASP.NET MVC application. It provides an interface foradministrators to upload video and schedule transcoding. It also enables administrators and users to downloadthe transcoded videos.

When videos are uploaded, they are populated with metadata used to identify the video. The video metadata isgathered by only one system when the video upload is complete.

Customers require support for Microsoft Internet Explorer 7 and later.

The application contains a header that is visible on every page.

If the logged-on user is an administrator, then the header will contain links to administrative functions. Thisinformation is read from a cookie that is set on the server. The administrative links must not be present if anerror condition is present.

Technical Requirements

User Experience:The front-end web application enables a user to view a list of videos.The main view of the application is the web page that displays the list of videos.HTML elements other than the list of videos are changed with every request requiring the page to reload.

Compatibility: Some customers use browsers that do not support the HTTP DELETE verb.These browsers send a POST request with an HTTP header of X-Delete when the intended action is to delete.

Transcoding: The video transcoding occurs on a set of Windows Azure worker roles.The transcoding is performed by a third-party command line tool named transcode.exe. When the tool isinstalled, an Environment variable named transcode contains the path to the utility.A variable named license contains the license key. The license for the transcoding utility requires that it beunregistered when it is not in use.The transcoding utility requires a significant amount of resources. A maximum of 10 instances of the utility canbe running at any one time. If an instance of the role cannot process an additional video, it must not prevent anyother roles from processing that video.The utility logs errors to a Logs directory under the utilities path.A local Azure directory resource named perf is used to capture performance data.

Development:

Page 47: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Developers must use Microsoft Remote Desktop Protocol (RDP) to view errors generated by the transcode.exeutility.An x509 certificate has been created and distributed to the developers for this purpose.Developers must be able to use only RDP and not any other administrative functions.

Application Structure

Page 48: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications
Page 49: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications
Page 50: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

QUESTION 1The transcode.exe utility activates its license online when it is installed. You need to ensure that the registrationof the transcode utility is handled as specified in its license.

Which method should you add to the TranscodeWorkerRole class?

Page 51: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

A. Option A

B. Option B

C. Option C

D. Option D

Correct Answer: DSection: [none]Explanation

Explanation/Reference:

QUESTION 2You need to ensure that all customers can delete videos regardless of their browser capability.

Which code segment should you use as the body of the SendAsync method in the DeleteHandler class?

Page 52: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

A. Option A

B. Option B

C. Option C

D. Option D

Correct Answer: BSection: [none]Explanation

Explanation/Reference:updated.

QUESTION 3The 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.)

Page 53: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Hot Area:

Page 54: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications
Page 55: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Correct Answer:

Page 56: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications
Page 57: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Section: [none]Explanation

Explanation/Reference:

QUESTION 4You need to ensure that the transcode.exe utility is installed before the worker role starts.

How should you implement the startup task? (To answer, drag the appropriate values to the correct element orattribute. Each value may be used once, more than once, or not at all. You may need to drag the split barbetween panes or scroll to view content.)

Select and Place:

Page 58: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications
Page 59: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Correct Answer:

Page 60: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications
Page 61: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Section: [none]Explanation

Explanation/Reference:

QUESTION 5You 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 theAzure Management Portal.

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

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

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

Correct Answer: DSection: [none]Explanation

Explanation/Reference:

QUESTION 6Customers 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?

Page 62: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

A. Option A

B. Option B

C. Option C

D. Option D

E. Option E

Correct Answer: ESection: [none]Explanation

Explanation/Reference:

QUESTION 7You need to ensure that all the MVC controllers are secure. Which code segment should you use as the bodyfor the CreateController method in AdminVerifierFactory.es?

Page 63: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

A. Option A

B. Option B

C. Option C

D. Option D

Correct Answer: CSection: [none]Explanation

Explanation/Reference:

QUESTION 8

Page 64: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

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 ExecuteResultmethod. 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 theAuthorizeCore method. Change usages of the existing AuthorizeAttribute to use the new class.

Correct Answer: CDSection: [none]Explanation

Explanation/Reference:corrected.

QUESTION 9You need to maximize performance of video delivery.

Which code segment should you use as the body of the GetVideoStream function in the Video- Controllerclass?

Page 65: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

A. Option A

B. Option B

C. Option C

D. Option D

Correct Answer: DSection: [none]Explanation

Explanation/Reference:

Page 66: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Testlet 1

TESTLET OVERVIEW

Title: Case Study

The following testlet will present a Case Study followed by [count] multiple choice question(s), [count] create atree question(s), [count] build list and reorder question(s) and [count] drop and connect question(s).

You will have [count] minutes to complete the testlet.

For help on how to answer the questions, click the Instuctions button on the question screen.

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

Which command-line tool should you use?

A. Mage.exe

B. Ngen.exe

C. ALexe

D. Resgen.exe

Correct Answer: CSection: [none]Explanation

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

QUESTION 2You are developing an ASP.NET MVC application.

The application provides a RESTful API for third-party applications. This API updates the information for acontact 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.)

Page 67: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

A. Option A

B. Option B

C. Option C

D. Option D

Correct Answer: BDSection: [none]Explanation

Explanation/Reference:Basics of RESTful services:

REST stands for Representational State Transfer, it is a simple stateless architecture that runs over HTTPwhere each unique URL is representation of some resource. There are four basic design principles whichshould 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 toremove a resource use DELETE.

Page 68: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Etc.

QUESTION 3You are designing a data-oriented application that features a variety of storage schemas.

The application object model must be mapped to the various storage schemas.

You need to enable developers to manipulate the data.

Which ADO.NET data access strategy should you use? (Each correct answer presents a complete solution.Choose all that apply.)

A. LINQ to SQL

B. Entity Framework

C. DataAdapter

D. DataReader

Correct Answer: ABCSection: [none]Explanation

Explanation/Reference:

QUESTION 4You are developing an ASP.NET MVC application that provides instant messaging capabilities to customers.

You have the following requirements:Messages must be able to be sent and received simultaneously. Latency and unnecessary header data mustbe eliminated.The application must comply with HTML5 standards.

You need to design the application to meet the requirements.

What should you do?

A. Configure polling from the browser.

B. Implement long-running HTTP requests.

C. Implement WebSockets protocol on the client and the server.

D. Instantiate a MessageChannel object on the client.

Correct Answer: DSection: [none]Explanation

Explanation/Reference:

QUESTION 5You 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.

Page 69: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

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.

Correct Answer: CSection: [none]Explanation

Explanation/Reference:

QUESTION 6You 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 thatapply.)

Page 70: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

A. Option A

Page 71: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

B. Option B

C. Option C

D. Option D

Correct Answer: CDSection: [none]Explanation

Explanation/Reference:

QUESTION 7You are implementing a website redesign of an existing website that provides historical weather conditionmaps.

The current layout resembles the graphic in the exhibit. (Click the Exhibit button.)

Year selection is implemented as a set of links, which causes the page to reload when the user changes theyear. The year selection HTML is contained in a div with an id of "year-selector".

You need to modify the page so that the user can change the year without the page reloading.

You also need to ensure that there is minimal change to the design of the page.

Which code segment should you use?

Page 72: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

A. Option A

B. Option B

C. Option C

D. Option D

Correct Answer: ASection: [none]Explanation

Explanation/Reference:

QUESTION 8You are designing a localized ASP.NET MVC online shopping application that will be deployed to customers inthe United States, China, France, and Brazil. The application must support multiple cultures so that content inthe appropriate language is available in each area. You need to ensure that the content can be viewed inseveral languages.

How should you implement this feature?

A. Use a resource (.resx) file to provide translations.

B. Use Systems.Collections.Generics.Dictionary to store alternative translations.

C. Ensure that all strings are marked internal to avoid conflict with internal literals.

D. Include language-specific content in the assembly manifest and use .NET culture libraries.

Page 73: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Correct Answer: ASection: [none]Explanation

Explanation/Reference:A resource file is an XML file that contains the strings that you want to translate into different languages orpaths to images. The resource file contains key/value pairs. Each pair is an individual resource. Key names arenot case sensitive. For example, a resource file might contain a resource with the key Button1 and the valueSubmit. You create a separate resource file for each language (for example, English and French) or for alanguage and culture (for example English [U.K.], English [U.S.]). Each localized resource file has the samekey/value pairs; the only difference is that a localized resource file can contain fewer resources than the defaultresource file. The built-in language fallback process then handles loading the neutral or default resource.

Reference: SP.NET Web Page Resources Overview

QUESTION 9You are designing an enterprise-level Windows Communication Foundation (WCF) application. User accountswill migrate from the existing system. The new system must be able to scale to accommodate the increasingload.

The new servers are experiencing significant stress under load of large-scale role changes.

You need to ensure that the application can handle the stress.

Which authorizations should you redesign? (Each correct answer presents a complete solution.Choose all that apply.)

A. Role-based approach

B. Identity-based approach

C. Resource-based trusted subsystem model

D. Resource-based impersonation/delegation model

Correct Answer: ACSection: [none]Explanation

Explanation/Reference:

QUESTION 10You are designing a distributed application.

The application must store secure information that is specific to an individual user. The data must beautomatically purged when the user logs off.

You need to save transient information in a secure data store.

Which data store should you use?

A. Session state

B. Database storage

C. Profile properties

D. Application state

Correct Answer: BSection: [none]

Page 74: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Explanation

Explanation/Reference:

QUESTION 11You are designing a localized ASP.NET application to support multiple cultures.

You need to ensure that the application can be displayed in several languages.

How should you implement this feature?

A. Use a resource (.resx) file.

B. Include language-specific content in the assembly manifest.

C. Use Systems.Collections.Generics.Dictionary to store alternative translations.

D. Ensure that all strings are marked internal.

Correct Answer: ASection: [none]Explanation

Explanation/Reference:

QUESTION 12You 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 correctlocation or locations. Each line of code may be used once, more than once, or not at all. You may need to dragthe split bar between panes or scroll to view content.)

Select and Place:

Page 75: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications
Page 76: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Correct Answer:

Page 77: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications
Page 78: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Section: [none]Explanation

Explanation/Reference:

QUESTION 13You 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. Thelocation 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 appropriatecode segment to the correct location or locations. Each code segment may be used once, more than once, ornot at all. You may need to drag the split bar between panes or scroll to view content.)

Select and Place:

Page 79: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications
Page 80: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Correct Answer:

Page 81: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications
Page 82: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Section: [none]Explanation

Explanation/Reference:

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

The pages for Windows Phone 7 include the following files: _Layout.WP7.cshtmlIndex.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 thecorrect location or locations. Each line of code may be used once, more than once, or not at all. You may needto drag the split bar between panes or scroll to view content.)

Select and Place:

Page 83: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Correct Answer:

Page 84: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Section: [none]Explanation

Explanation/Reference:http://techbrij.com/1013/display-mode-mobile-tablet-tv-aspnet-mvc

QUESTION 15You are developing an ASP.NET MVC application in Visual Studio 2012. The application contains sensitivebank account data.

The application contains a helper class named SensitiveData.Helpers.CustomEncryptor.

Page 85: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

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 orlocations. Each code segment may be used once, more than once, or not at all. You may need to drag the splitbar between panes or scroll to view content.)

Select and Place:

Page 86: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Correct Answer:

Section: [none]Explanation

Explanation/Reference:

QUESTION 16You are developing an ASP.NET MVC application that authenticates a user by using claims-basedauthentication.

Page 87: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

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 listin the answer area.)

Hot Area:

Page 88: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications
Page 89: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Correct Answer:

Page 90: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications
Page 91: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Section: [none]Explanation

Explanation/Reference:http://garvincasimir.wordpress.com/2012/04/05/tutorial-mvc-application-using-azure-acs-and-forms-authentication-part-1/

QUESTION 17You 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 answerarea.)

Page 92: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Hot Area:

Page 93: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications
Page 94: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Correct Answer:

Page 95: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications
Page 96: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Section: [none]Explanation

Explanation/Reference:http://msdn.microsoft.com/en-us/library/system.web.security.sqlmembershipprovider.aspx

QUESTION 18You are developing an ASP.NET MVC web application that enables users to open Microsoft Excel files.

The current implementation of the ExcelResult class is as follows.

You need to enable users to open Excel files.

How should you implement the ExecuteResult method? (To answer, select the appropriate options in theanswer area.)

Hot Area:

Page 97: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Correct Answer:

Page 98: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Section: [none]Explanation

Explanation/Reference:

QUESTION 19You are developing an ASP.NET MVC application that authenticates a user by using claims-basedauthentication.

The application must:

Page 99: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

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, drag the appropriate code segment to the correctlocation or locations 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.)

Select and Place:

Correct Answer:

Page 100: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Section: [none]Explanation

Explanation/Reference:Similar example:For Box 1, see line 15.For Box 2, see line 22.For Box 3, see line 22.For Box 4, see line 26.

using System;

Page 101: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

02using System.Collections.Generic;

03using System.Linq;

04using System.Web;

05using Microsoft.IdentityModel.Claims;

06

07namespace MVC3MixedAuthenticationSample.Models

08{

09 public class IdentityClaim

10 {

11 private string _identityProvider;

12 private string _identityValue;

13 public const string ACSProviderClaim ="http://schemas.microsoft.com/accesscontrolservice/2010/07/claims/identityprovider";

14

15 public IdentityClaim(IClaimsIdentity identity)

16 {

17

18 if (identity != null)

19 {

20 foreach (var claim in identity.Claims)

21 {

22 if (claim.ClaimType == ClaimTypes.NameIdentifier)

23 {

24 _identityValue = claim.Value;

25 }

26 if (claim.ClaimType == ACSProviderClaim)

27 {

28 _identityProvider = claim.Value;

29 }

30

Page 102: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

31 }

32 }

33

34 }

QUESTION 20You are developing an ASP.NET MVC application that has pages for users who browse the site with WindowsPhone 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.)

Hot Area:

Page 103: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Correct Answer:

Page 104: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Section: [none]Explanation

Explanation/Reference:

Page 105: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

QUESTION 21You are developing an ASP.NET MVC application. The application has a view that displays a list of orders in amulti-select list box.

You need to enable users to select multiple orders and submit them for processing.

What should you do? (To answer, drag the appropriate words to the correct targets. Each word may be usedonce, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)

Select and Place:

Correct Answer:

Section: [none]Explanation

Explanation/Reference:

QUESTION 22You are developing an ASP.NET MVC application.

Page 106: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

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 LogActionFilterclass? (To answer, drag the appropriate code segments to the correct targets. Each code segment may beused once, more than once, or not at all. You may need to drag the split bar between panes or scroll to viewcontent.)

Select and Place:

Correct Answer:

Section: [none]Explanation

Page 107: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Explanation/Reference:

QUESTION 23You 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 thewebsite 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.)

Hot Area:

Correct Answer:

Page 108: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Section: [none]Explanation

Explanation/Reference:

QUESTION 24You 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:

Which markup segments should you include in Target 1, Target 2 and Target 3 to complete the markup? (Toanswer, 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.)

Select and Place:

Correct Answer:

Page 109: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Section: [none]Explanation

Explanation/Reference:

QUESTION 25You are developing an ASP.NET MVC web application that requires HTML elements to take on new behaviors.These should be implemented with a behavior script in a page that is only for Microsoft Internet Explorer users.

The colorchange.js script uses the Microsoft CSS vendor-specific Behavior extension. You need to apply thescript with CSS.

You need to use the script to change the color of text.

You have the following markup:

Which styles should you include in Target 1 and Target 2 to complete the markup? (To answer, drag theappropriate styles to the correct targets. Each style may be used once, more than once, or not at all. You mayneed to drag the split bar between panes or scroll to view content.)

Select and Place:

Page 110: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Correct Answer:

Section: [none]Explanation

Explanation/Reference:

QUESTION 26

Page 111: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

You are developing an ASP.NET MVC application in Visual Studio 2012. The application will be viewed withbrowsers on desktop devices and mobile devices. The application uses the Razor View Engine to display data.

The application contains two layouts located in the /Views/Shared directory.

These layouts are named: _Layout.cshmtl_MobleLayoutcshtml

The application must detect if the user is browsing from a mobile device. If the user is browsing from a mobiledevice, the application must use the _MobileLayout.cshtml file. If the user is browsing from a desktop device,the application must use .Layout, cs html.

You need to ensure that the application renders the layout that is appropriate for the browser.

You have the following code:

Which code segments should you include in Target 1, Target 2 and Target 3 to complete the code of theViewStart.cshtml file? (To answer, drag the appropriate code segments to the correct targets. Each codesegment may be used once, more than once, or not at all. You may need to drag the split bar between panes orscroll to view content.)

Select and Place:

Correct Answer:

Page 112: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Section: [none]Explanation

Explanation/Reference:

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

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 ofactions to the answer area and arrange them in the correct order.)

Select and Place:

Correct Answer:

Page 113: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Section: [none]Explanation

Explanation/Reference:

QUESTION 28You 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.)

Hot Area:

Page 114: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Correct Answer:

Section: [none]Explanation

Explanation/Reference:

QUESTION 29You are developing an ASP.NET MVC application in Visual Studio 2012. The application supports multiplecultures.

To set the culture, the application must use the AcceptLanguagc header field value sent by the client browser.

You need to ensure that the application can set the culture.

You have the following markup in the web.config file:

Which markup segments should you include in Target 1, Target 2 and Target 3 to complete the markup? (Toanswer, select the appropriate options in the answer area.)

Hot Area:

Page 115: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Correct Answer:

Section: [none]Explanation

Explanation/Reference:

QUESTION 30You are developing an ASP.NET MVC application in Visual Studio 2012. The application processes data for abakery and contains a controller named BagelController.es that has several actions. The GetBagel action is

Page 116: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

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 actionsin 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 thelist of actions to the answer area and arrange them in the correct order.)

Select and Place:

Correct Answer:

Page 117: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Section: [none]Explanation

Explanation/Reference:

QUESTION 31You are developing an ASP.NET MVC application in a web farm. The application has a page that uploads acustomer's photo, resizes it, and then redirects the browser to a page where the new image is displayed alongwith the final dimensions.

The final dimensions should be available only to the page where the new image is displayed.

You need to store state and configure the application.

What should you do? (To answer, drag the appropriate item to the correct location. Each item may be usedonce, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)

Select and Place:

Page 118: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Correct Answer:

Section: [none]Explanation

Explanation/Reference:

QUESTION 32You are developing an ASP.NET MVC application that uses forms authentication. The user database containsa user named LibraryAdmin.

You have the following requirements:You must allow all users to access the GetBook method. You must restrict access to the EditBook method tothe 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 thatapply.)

Page 119: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications
Page 120: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

A. Option A

B. Option B

Page 121: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

C. Option C

D. Option D

Correct Answer: ACSection: [none]Explanation

Explanation/Reference:

QUESTION 33You are designing an HTML5 website.You need to design the interface to make the content of the web page viewable in all types of browsers,including voice recognition software, screen readers, and reading pens.

What should you do? (Each correct answer presents a complete solution. Choose all that apply.)

A. Annotate HTML5 content elements with Accessible Rich Internet Application (ARIA) attributes.

B. Convert HTML5 forms to XForms.

C. Ensure that HTML5 content elements have valid and descriptive names.

D. Use HTML5 semantic markup elements to enhance the pages.

E. Use Resource Description Framework (RDF) to describe content elements throughout the entire page.

Correct Answer: ADSection: [none]Explanation

Explanation/Reference:

QUESTION 34You are developing an ASP.NET MVC web application in Visual Studio 2012. The application requires severalthousand 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.

Correct Answer: BSection: [none]Explanation

Explanation/Reference:

QUESTION 35You are developing an ASP.NET MVC application in Visual Studio 2012. The application supports multiplecultures.

Page 122: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

The application contains three resource files in the Resources directory:My Dictionary.resxMyDictionary.es.resxMyDictionary.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", newSystem.Globalization.CultureInfo("en"));

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

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

Correct Answer: CSection: [none]Explanation

Explanation/Reference:

QUESTION 36You are testing an ASP.NET application.

The test plan requires that tests run against the application's business layer.

You need to use the test project template that meets this requirement.

Which template should you use?

A. Web Test Project

B. Load Test Project

C. Unit Test Project

D. Coded Test Project

Correct Answer: CSection: [none]Explanation

Page 123: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Explanation/Reference:valid and modified.

QUESTION 37You are authoring unit tests.The unit tests must test code that consumes sealed classes. You need to create, maintain, and injectdependencies in the unit tests.

Which isolation method should you use?

A. T4 text templates and code generation

B. Stub types

C. Shim types

D. Hard-coded implementation

Correct Answer: CSection: [none]Explanation

Explanation/Reference:http://msdn.microsoft.com/en-us/library/hh549176.aspx

Shim types are one of two technologies that the Microsoft Fakes Framework uses to let you easily isolatecomponents under test from the environment. Shims divert calls to specific methods to code that you write aspart of your test. Many methods return different results dependent on external conditions, but a shim is underthe control of your test and can return consistent results at every call. This makes your tests much easier towrite.

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

You need to test the AccountBalance method.

Which unit test should you use?

A. Option A

B. Option B

C. Option C

D. Option D

Correct Answer: CSection: [none]Explanation

Explanation/Reference: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

Page 124: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

QUESTION 39You 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?

A. From the DEBUG menu in Visual Studio 2012, select Exceptions. Enable the Thrown check box forCommon Language Runtime Exceptions.

B. From the DEBUG menu in Visual Studio 2012, select Exceptions. Disable the User- unhandled check boxfor 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. Add the following code to the Web.config file of the application.<customErrors mode="On" ><error statusCode="404" redirect="CustomErrors.html"/> </customErrors>

Correct Answer: ASection: [none]Explanation

Explanation/Reference:

QUESTION 40You are developing an ASP.NET MVC news aggregation application that will be deployed to servers on multiplenetworks.The application must be compatible with multiple browsers. A user can search the website for news articles.You must track the page number that the user is viewing in search results.

You need to program the location for storing state information about the user's search.

What should you do?

A. Store search results and page index in Session.

B. Use Application state to store search terms and page index.

C. Use QueryString to store search terms and page index.

D. Store search results and page index in TempData

Correct Answer: CSection: [none]Explanation

Explanation/Reference:

QUESTION 41You are developing an ASP.NET MVC application. The application is deployed in a web farm and is accessedby many users.

The application must handle web server failures gracefully. The servers in the farm must share the stateinformation.

Page 125: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

You need to persist the application state during the session.

What should you implement?

A. A state server

B. Cookieless sessions

C. A web garden on the web servers

D. An InProc session

Correct Answer: ASection: [none]Explanation

Explanation/Reference:

QUESTION 42You 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 eliminateunnecessary header data, minimize latency, and transmit data over a full- duplex connection.

What should you do?

A. Implement long-running HTTP requests.

B. Instantiate a MessageChannel object on the client.

C. Implement WebSockets protocol on the client and the server.

D. Configure polling from the browser.

Correct Answer: CSection: [none]Explanation

Explanation/Reference:

QUESTION 43You are designing a distributed application that runs on the Windows Azure platform.

The application must store a small amount of insecure global information that does not change frequently.

You need to configure the application to meet the requirements.

Which server-side state management option should you use? (Each correct answer presents a completesolution. Choose all that apply.)

A. Windows Azure application state

B. Sql Azure

C. Profile properties of the Windows Azure application

D. Windows Azure session state

Correct Answer: BDSection: [none]Explanation

Explanation/Reference:

Page 126: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

SQL Database provides a relational database management system for Windows Azure and is based on SQLServer technology. With a SQL Database instance, you can easily provision and deploy relational databasesolutions to the cloud, and take advantage of a distributed data center that provides enterprise-class availability,scalability, and security with the benefits of built-in data protection and self-healing.

Session States in Windows Azure.If you are a Web developer, you are probably very familiar with managing user state - that is you are familiarwith tracking user activity and actions across several request-response exchanges that occur in Webapplications. Since HTTP is a stateless protocol, developers over the years have developed all sorts of meansto manage state. You'll even find an MSDN page providing alternatives and recommendations for statemanagement here. Cookies, hidden fields, and query strings are some client-side options to tracking user state.When it comes to managing that state on the server-side, most Web developers rely on session objects.

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

When the orientation changes to landscape, each tile in the grid expands to include each contact's details. TheHTML 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 500pixels.

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

Page 127: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

. . .}

Correct Answer: BSection: [none]Explanation

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

QUESTION 45You are developing an ASP.NET MVC application.

You need to authenticate clients by using NT LAN Manager (NTLM).Which authentication method should you implement?

A. Basic

B. Windows

C. Forms

D. Kerberos

Correct Answer: BSection: [none]Explanation

Explanation/Reference:http://msdn.microsoft.com/en-us/library/aa292114(v=vs.71).aspx

QUESTION 46You are developing an ASP.NET MVC application.

The application must allow users to enter JavaScript in a feedback text box only.

You need to disable request validation.

What should you do?

A. Apply and set the CausesClientSideValidation attribute on the text box to FALSE.

B. Apply and set the ValidateInput attribute on the text box to FALSE.

C. Use the HttpRequest.Unvalidated property to read the unvalidated form value.

D. Use the HttpRequest.Form property to read the unvalidated form value.

Correct Answer: CSection: [none]Explanation

Explanation/Reference:Provides access to HTTP request values without triggering request validation.

http://msdn.microsoft.com/en-us/library/system.web.httprequest.unvalidated.aspx

QUESTION 47You 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 easilydecodable

Page 128: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

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

Correct Answer: ASection: [none]Explanation

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

QUESTION 48You are designing a distributed application.The application must store a small amount of insecure global information that does not change frequently.

You need to configure the application to meet the requirements.

Which server-side state management option should you use? (Each correct answer presents a completesolution. Choose all that apply.)

A. Application state

B. Session state

C. Database support

D. Profile properties

Correct Answer: ACSection: [none]Explanation

Explanation/Reference:corrected and updated.

QUESTION 49You are developing an ASP.NET MVC application. The application is deployed in a web farm and is accessedby many users.

The application must handle web server failures gracefully. The servers in the farm must share the short-termstate information.

You need to persist the application state during the session.

What should you implement?

A. ASP.NET session state

B. A local database

C. A state server

D. Profile properties

Correct Answer: CSection: [none]Explanation

Page 129: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Explanation/Reference:

QUESTION 50You need to implement the business requirement to display video clips.

Which code segment should you use in the MainPage.xaml file?

A. Option A

B. Option B

C. Option C

D. Option D

Correct Answer: A

Page 130: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Section: [none]Explanation

Explanation/Reference:http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.media.animation.storyboard.aspx

QUESTION 51You need to implement downloading of media files and other content.

Which code segment should you add to App.xaml.cs?

Page 131: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications
Page 132: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

A. Option A

B. Option B

C. Option C

D. Option D

Correct Answer: BSection: [none]Explanation

Explanation/Reference:http://msdn.microsoft.com/en-us/library/windows/apps/windows.networking.backgroundtransfer.backgrounddownloader.getcurrentdownloadsasync.aspx

QUESTION 52You need to ensure that the app uploads media and files to the media manager service.

What should you do? (Each correct answer presents part of the solution. Choose all that apply.)

A. Option A

B. Option B

C. Option C

D. Option D

E. Option E

Correct Answer: BDSection: [none]

Page 133: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Explanation

Explanation/Reference:http://msdn.microsoft.com/en-us/library/windows/apps/windows.networking.backgroundtransfer.uploadoperation.aspx http://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.pickers.fileopenpicker.pickmultiplefilesasync.aspx

QUESTION 53You need to implement a custom control to display thumbnail images of video clips.

Which code segment should you use?

A. Option A

B. Option B

C. Option C

D. Option D

Correct Answer: CSection: [none]Explanation

Explanation/Reference:

Page 134: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.control.defaultstylekey.aspx

QUESTION 54You need to implement the requirements for the playback of media.

What should you do? (Each correct answer presents part of the solution. Choose all that apply.)

A. Add the following line of code at line MC02.private void ShowPlayTo(){Windows.Media.PlayTo.PlayToManager.ShowPlayToUI();}

B. Add the following line of code at line MC06.ptMgr.DefauitSourceSelection = false;

C. Add the following line of code at line MC10.ptMgr.PlayRequested += SourceRequestHandler;

D. Add the following line of code at line MC05.ptMgr.SourceRequested += SourceRequestHandler;

Correct Answer: BDSection: [none]Explanation

Explanation/Reference:http://msdn.microsoft.com/en-us/library/windows/apps/windows.media.playto.playtomanager.aspx

QUESTION 55You need to implement the requirements for the behavior of the main page. Which code segment should youinsert at line MP07?

Page 135: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

A. Option A

B. Option B

C. Option C

D. Option D

Correct Answer: ASection: [none]Explanation

Explanation/Reference:

Page 136: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

QUESTION 56You need to ensure that the VideoProcessor component can be used by the Windows Store app.

What should you do? (Each correct answer presents part of the solution. Choose all that apply.)

A. Add the following attribute to line IP19.[Windows.Foundation.Metadata.DefaultOverload()]

B. Replace line IP01 with the following line of code.Static class VideoProcessor

C. Replace line IP09 with the following line of code.PublicVideoProcessor(string videoName, int ID)

D. Add the following attribute to line IP14.[Windows.Foundation.Metadata.DefaultOverload()]

E. Replace line IP01 with the following line of code.Public sealed class VideoProcessor

Correct Answer: ACESection: [none]Explanation

Explanation/Reference:

QUESTION 57You need to implement the business requirements for providing information about file uploads and downloads.

Which code segment should you use in the VideoProcessor.es class?

Page 137: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

A. Option A

B. Option B

C. Option C

D. Option D

Correct Answer: ASection: [none]Explanation

Explanation/Reference:http://msdn.microsoft.com/en-us/library/hh779739(v=vs.110).aspx

QUESTION 58You need to implement the requirements for streaming media.

What should you do? (Each correct answer presents part of the solution. Choose all that apply.)

A. Enable access to the Videos Library.

B. Ensure that the app stays in the foreground while media is being streamed.

C. Enable access to the Pictures Library.

Page 138: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

D. Register for the SourceRequested event.

E. Enable access to the Music Library.

F. Register for the PlayRequested event.

Correct Answer: ADSection: [none]Explanation

Explanation/Reference:From scenario:Team members must be able to stream video clips to other devices in the vicinity of the team member's device.The app will not support the streaming of photographs.

D: You can use Play To to stream the audio or video in your application, as well as images, by implementing thePlay To contract. To implement the Play To contract in your application, register for the sourceRequestedevent.

Note:To register for the sourceRequested event, get a reference to the current PlayToManager by calling thegetForCurrentView method. You can then call addEventHandler on the PlayToManager to associate your eventhandler with the sourceRequested event. In your event handler, pass the media element from your applicationto the setSource method of the PlayToSourceRequestedEventArgs object passed to the event handler asshown in the following example.

// Play To Contract

private Windows.Media.PlayTo.PlayToManager ptm =Windows.Media.PlayTo.PlayToManager.GetForCurrentView();

protected override void OnNavigatedTo(NavigationEventArgs e) {ptm.SourceRequested += sourceRequestHandler;}

private void sourceRequestHandler(Etc.

http://msdn.microsoft.com/en-us/library/windows/apps/windows.media.playto.aspx

QUESTION 59You need to implement the behavior requirements for the photo viewer.

Which controls should you create?

A. Create two SemanticZoom controls and one ListView control.

B. Create one SemanticZoom control and one ListView control.

C. Create one ScrollViewer control, one SemanticZoom control, and one GridView control.

D. Create two GridView controls and one SemanticZoom control.

Correct Answer: DSection: [none]Explanation

Explanation/Reference:

QUESTION 60You need to implement the photo viewer control to meet the requirements.

Page 139: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

What should you do? (Each correct answer presents part of the solution. Choose all that apply.)

A. Add the themes\generic.xaml file to the project and reference it from the control.

B. Create a composite control.

C. Create a user control.

D. Create a custom control.

E. In the constructor of the class, set the value of the DefaultStyleKey to the type of the control.

Correct Answer: CDESection: [none]Explanation

Explanation/Reference:The SemanticZoom control enables the user to switch between two different views of the same content. One ofthese is the main view of the content. The second view is a view of the same content represented in a way thatallows users to quickly navigate through it. For example, when viewing an address book, the user could zoom inon a letter and see the names associated with that letter.To provide this zooming functionality, the SemanticZoom control uses two other controls: one to provide thezoomed-in view and one to provide the zoomed-out view.

* From scenario:The app must include a photo viewer. When photos are added or deleted in the photo viewer window, theymust animate in and out of the field of view. Remaining photos must move to fill the empty space created whenphotos are deleted. The photo viewer must support semantic zoom.

QUESTION 61You need to register the reusable WinMD component.

What should you do?

A. Option A

B. Option B

C. Option C

D. Option D

Page 140: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Correct Answer: ASection: [none]Explanation

Explanation/Reference:http://weblogs.asp.net/lkempe/projectreference-with-condition-in-your-msbuild-project-files

QUESTION 62You need to modify the existing GetCurrentEnvironmentAsync() method in the Environment WinMD componentto accept parameters.

Which type should you use at line CE07?

A. Dynamic

B. List<string>

C. Task<EnvironmentalStatus>

D. IList<string>

Correct Answer: DSection: [none]Explanation

Explanation/Reference:http://msdn.microsoft.com/en-us/library/5y536ey6(v=vs.110).aspx

QUESTION 63The users need the ambient light readings at the time a goose sighting is made.You need to set up the light-sensing device.

Which code segment should you add to the LoadSensors() method of the Environment class?

A. Option A

B. Option B

C. Option C

Page 141: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

D. Option D

Correct Answer: DSection: [none]Explanation

Explanation/Reference:http://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.sensors.lightsensor.aspx

QUESTION 64You need to set the PlayTo source in the LoadFile() method. Which line of code should you insert at line PT30?

A. element.SetSource(videoFile, contentType);

B. playToManager.SetSource(stream, contentType);

C. dispatcher.SetSource(stream, contentType);

D. element.SetSource(stream, contentType);

Correct Answer: DSection: [none]Explanation

Explanation/Reference:http://msdn.microsoft.com/en-us/library/windows/apps/jj655411.aspx

QUESTION 65You need to ascertain whether the device that the app is running on has a compass.

Which line of code should you insert at line CE43?

A. while(Windows.Devices.Sensors == Compass)

B. if (Compass.GetDefault() != null)

C. if (Compass.GetDefault() == Compass.FirstOrDefault)

D. if(Compass.GetCurrentReading() != null)

Correct Answer: BSection: [none]Explanation

Explanation/Reference:http://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.sensors.compass.aspx

QUESTION 66You need to get the WhiteBalance property for the app.

Which line of code should you insert at line CA10?

Page 142: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

A. Option A

B. Option B

C. Option C

D. Option D

Correct Answer: CSection: [none]Explanation

Explanation/Reference:http://msdn.microsoft.com/en-us/library/windows/apps/br211997.aspx

QUESTION 67You need to support remote devices by using the GoosePlayTo class. Which code segment should you use inMainPage.xaml.es?

A. Option A

B. Option B

C. Option C

D. Option D

Correct Answer: CSection: [none]Explanation

Explanation/Reference:http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.mediaelement.aspx

Page 143: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

QUESTION 68You need to ascertain whether a camera can support zooming.

Which code segment should you insert at line CA28?

A. Option A

B. Option B

C. Option C

D. Option D

Correct Answer: BSection: [none]Explanation

Explanation/Reference:

QUESTION 69The app metadata logic must be available to other Windows Store apps.You need to register the reusable WinMD component.

What should you do?

Page 144: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

A. Option A

B. Option B

C. Option C

D. Option D

Correct Answer: ASection: [none]Explanation

Explanation/Reference:http://weblogs.asp.net/lkempe/projectreference-with-condition-in-your-msbuild-project-files

QUESTION 70Users report performance issues when getting the location information associated with a photo. You suspectthe app is encountering performance issues in the GetLocationAsync() method of the Environment class.

You need to enhance the performance of the GetLocationAsync() method of the app.

What should you do?

A. Remove the Compass initialization from the LoadSensors() method and initialize it within theGetLocationAsync() method.

B. set the ReportInterval property of the Compass object to 16.

C. set the ReportInterval property of the Compass object to 0.

D. Move the locator variable to a class level variable and initialize it in the Environment constructor.

Correct Answer: DSection: [none]Explanation

Explanation/Reference:

Page 145: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

QUESTION 71You need to modify the GetWeatherData() method in the WinMD component at line CE38.

Which interface should you use for the return type of the method?

A. IVectorView

B. IVector

C. IList

D. IMap

Correct Answer: ASection: [none]Explanation

Explanation/Reference:http://msdn.microsoft.com/en-us/library/windows/apps/br226058.aspx

QUESTION 72You place a breakpoint at line MP31 in the app.

When you debug the app, the debugger continuously catches a System.UnauthorizedAccess exception.

You need to resolve the exception.

What should you do?

A. Wrap lines CE43 through CE46 in a try-catch statement.

B. At line MP10, change the code segment to the following line of code.read if(cameraUI != null)

C. Move line CE09 to CE16.

D. At line PA25, insert the following line of code.<Capability Name="picturesLibrary"/>

Correct Answer: DSection: [none]Explanation

Explanation/Reference:http://msdn.microsoft.com/en-us/library/windows/apps/hh464936.aspx

QUESTION 73You need to create a SupportsBacklightCompensation property to accommodate morning and eveningphotography.

Which line of code should you insert at line CA19?

A. return (video.BacklightCompensation.Capabilities.Min == 0);

B. return video.BacklightCompensation.Capabilities.Supported;

C. return (media.BacklightCompensation.Capabilities.Min == 0);

D. return media.BacklightCompensation.Capabilities.Supported;

Correct Answer: BSection: [none]Explanation

Page 146: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Explanation/Reference:http://msdn.microsoft.com/en-us/library/windows/apps/windows.media.devices.videodevicecontroller.backlightcompensation.a spx

QUESTION 74You need to reference the reusable WinMD project.

What should you do?

A. Option A

B. Option B

C. Option C

D. Option D

Correct Answer: CSection: [none]Explanation

Explanation/Reference:http://weblogs.asp.net/lkempe/projectreference-with-condition-in-your-msbuild-project-files

QUESTION 75You need to modify the code at line CE38 to meet the requirements.

Which interface should you use for the return type of the method?\

A. IMap

B. IVector

C. IVectorView

D. IList

Page 147: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Correct Answer: BSection: [none]Explanation

Explanation/Reference:http://msdn.microsoft.com/en-us/library/windows/apps/br206631.aspx

QUESTION 76You need to protect the metadata for the secure documents.

Which protection descriptor should you use for the DataProtectionProvider object?

A. SID

B. WEBCREDENTIALS=userrpassword

C. LOCAL=user

D. USER=current

Correct Answer: CSection: [none]Explanation

Explanation/Reference:http://msdn.microsoft.com/en-us/library/windows/apps/windows.security.cryptography.dataprotection.dataprotectionprovider.a spx

QUESTION 77Exceptions occur when the WriteAuditAsync() method of the Auditor object is run.

The UI must remain responsive to user actions.

You need to handle the exceptions.Which code segment should you use?

Page 148: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

A. Option A

B. Option B

C. Option C

D. Option D

Correct Answer: ASection: [none]Explanation

Explanation/Reference:

QUESTION 78You need to register the SocialPoller background task in the constructor of the Page1 class.

Page 149: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Which statement sets the appropriate task entry point at line PG19?

A. builder.TaskEntryPoint = "Ereader.Background.SocialPoller";

B. builder.BackgroundTableStart = "SocialPoller.Ereader.Background";

C. builder.TaskStart = "Pagel.SocialPoller ";

D. builder.TaskEntryPoint = "Ereader.Pagel";

Correct Answer: ASection: [none]Explanation

Explanation/Reference:http://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.background.backgroundtaskbuilder.aspx

QUESTION 79You need to deactivate features of the app when it runs as a trial.

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

A. licenseInforination.LicenseChanged += new LicenseChangedEventHandler (modifyLicense)

B. license.LicenseChanged += new LicenseChangedEventHandler(implementLicense)

C. licenseInformation = CurrentApp.GetCurrentLicense()

D. licenseInformation = CurrentApp.LicenseInformation

E. license = CurrentApp.GetCurrentLicense()

F. licenselnformation.LicenseChanged += new LicenseChangedEventHandler (implementLicense)

Correct Answer: BDSection: [none]Explanation

Explanation/Reference:B: // Register for the license state change event.licenseInformation.addEventListener("licensechanged", reloadLicense);

D: Initialize the CurrentApp or CurrentAppSimulator to access the app's license info.Example:// Get the license infolicenseInformation = currentApp.licenseInformation;

* From scenario:/ The app must provide trial functionality that will expire after 14 days. If the app expires while it is running, theapp must display an expiration message to the user and prompt the user to purchase the app.

http://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.store.currentapp.licenseinformation.aspx http://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.store.licensechangedeventhandler.aspx

QUESTION 80You need to set the default print options according to the requirements.

Which lines of code should you use at line PG33? (Each correct answer presents part of the solution. Chooseall that apply.)

A. printTask.Options.Orientation = a PrintOrientation.Portrait;

Page 150: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

B. printTask.Options.Orientation = Print.Default = Portrait;

C. printTask.Options.MediaSize = Print.Default = MediaSize.Legal;

D. printTask.Options.ColorMode = Print.ColorDefault = Grayscale;

E. printTask.Options.ColorMode = PrintColorMode. Grayscale;

F. printTask.Options.MediaSize = PrintMediaSize.Letter;

Correct Answer: AESection: [none]Explanation

Explanation/Reference:A: PrintOrientation enumerationSpecifies the orientation options for the printed output Portrait | portrait (value 3), The Portrait orientation option.E: We can also choose what we feel the default setting should be. Maybe we really wanted the Color Mode tobe set to grayscale rather than color. printTask.options.colorMode = _printing.PrintColorMode.graysc

From scenario:Printing:The default printing options are portrait orientation and grayscale color mode. The app must enable the user toselect the media size and printing orientation.http://msdn.microsoft.com/en-us/library/windows/apps/windows.graphics.printing.printorientation.aspx http://msdn.microsoft.com/en-us/library/windows/apps/windows.graphics.printing.printcolormode.aspx

QUESTION 81You need to update the DoWork() method of the background task to meet the requirements.

What should you do? (Each correct answer presents part of the solution. Choose all that apply.)

A. Get the IsCancellationRequested property from the CancellationToken object and return aTaskCompletionSource object.

B. Access the Progress object and report the task's progress to the caller.

C. Update the DoWork() method to receive a Progress object.

D. Add the CancellationToken object to the client.GetAsync() method.

E. Confirm that the IsCancellationRequested property of the CancellationToken object is true and exit the task.

F. Update the DoWork() method to receive a CancellationToken object in the arguments of the method.

Correct Answer: DEFSection: [none]Explanation

Explanation/Reference:Cancellation is controlled by the CancellationToken structure. You expose cancellation tokens in the signatureof cancelable async methods, enabling them to be shared between the task and caller. In the most commoncase, cancellation follows this flow:1. (D) The caller creates a CancellationTokenSource object.2. (F) The caller calls a cancelable async API, and passes the CancellationToken from theCancellationTokenSource (CancellationTokenSource.Token).3. The caller requests cancellation using the CancellationTokenSource object(CancellationTokenSource.Cancel()).4. (E)The task acknowledges the cancellation and cancels itself, typically using theCancellationToken.ThrowIfCancellationRequested method.

* From scenario:/ The SocialPoller background task must run the code in the DoWork() method to collect content from theContoso feed./ The UI must always remain responsive to user actions.

Page 151: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Note:* Task-based Asynchronous Pattern* CancellationToken Structure/ Propagates notification that operations should be canceled./ CancellationToken. IsCancellationRequestedGets whether cancellation has been requested for this token.

http://blogs.msdn.com/b/dotnet/archive/2012/06/06/async-in-4-5-enabling-progress-and- cancellation-in-async-apis.aspx

QUESTION 82You need to enable the capabilities that allow communication according to the technical requirements.

Which capabilities should you enable? (Each correct answer presents part of the solution. Choose all thatapply.)

A. Shared User Certificates

B. SSL Certificates

C. Internet (Client)

D. Default Windows Credentials

Correct Answer: BCSection: [none]Explanation

Explanation/Reference:B: From scenario:Communication between the app and e-book vendors must occur over an encrypted communication channel.Communication must use certificates to enable the SSL connection.

C:

Page 152: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

http://msdn.microsoft.com/en-us/library/windows/apps/Hh770532.aspx http://msdn.microsoft.com/en-us/library/windows/apps/Hh986970.aspx

QUESTION 83You need to handle the following exception and meet the error handling requirements.

Which code segment should you use?

Page 153: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

A. Option A

B. Option B

C. Option C

D. Option D

Correct Answer: ASection: [none]Explanation

Explanation/Reference:

QUESTION 84You need to configure the print options that a user can change.

Which lines of code should you use at line PG34? (Each correct answer presents part of the solution. Chooseall that apply.)

Page 154: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

A. Option A

B. Option B

C. Option C

D. Option D

E. Option E

F. Option F

Correct Answer: AESection: [none]Explanation

Explanation/Reference:http://msdn.microsoft.com/en-us/library/windows/apps/windows.graphics.printing.printtaskoptions.aspx The StandardPrintTaskOptions objectprovides the canonical names for the common print task options used in the PrintTaskOptions object. Thesenames may be used to add or remove items from thePrintTaskOptions.DisplayedOptions list to indicate theoptions that appear in the print window.From scenario: The app must enable the user to select the media size and printing orientation.

Topic 4, Fabrikam, Inc

OverviewFabrikam, Inc. is a realtor in the United States.

Fabrikam grants its customers access to a web site, where they can search for houses for rent and for sale. Itscustomers can enter basic requirements, such as location, number of rooms, dimensions, and a price range.The web site displays a list of houses that meet the customers' criteria. The customers can then view moredetails about each house and can add a listing to a favorites list.

Requirements

Business GoalsFabrikam plans to provide a more interactive experience for its customers. Fabrikam is creating a video tour foreach listing. The video tours can be used to visit the property virtually. Fabrikam plans to create a WindowsStore app on Windows 8.1 RT and Windows 8.1 Pro devices.

General RequirementsFabrikam identifies the following general requirements for the app:The app interface must be available in English, Spanish, and French. The app must provide the customers withthe ability to perform searches the same way that the current web site does.It is expected that the customers will view more than 3,000 pictures annually. The main page of the app must

Page 155: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

show a list of the last 10 pictures that were viewed. If pictures are added to a listing that is in a customer'sfavorites list, the pictures must be downloaded automatically from Windows Azure. This must occur if the app issuspended or not running.

Printing RequirementsCustomers must be able to print the details of a listing from the details page by clicking a button within the app.

You plan to add the following XAML markup to the listing details page:

<Button x:Name="btnPrint Content="Print" Click="InvokePrint" />.

Video Tour RequirementsFabrikam identifies the following requirements for the video tours:Customers must be able to play the video tour on a different device by using a button within the app.When a customer clicks the details of a listing, the app must start downloading the video tour in thebackground.When the app starts, the app must verify whether there are any pending downloads, and resume any pauseddownloads.The last five viewed video tours that are not on the customer's favorites list must be cached for subsequentviewing.Customers must be able to download all of the video tours for the properties that they added to their favoriteslist.The property details page must contain a MediaElement control that will be used to play the video tour of theproperty.When downloading the video tours, the app must remain responsive, and each download must be processedon a separate thread.

Package.appxmanifest

QUESTION 85You need to recommend a solution to comply with the language requirements of the app.

What should you include in the recommendation? (Each correct answer presents part of the solution. Choosethree.)

A. Use the ResourceLoader class to retrieve localized strings from the code.

B. In a subfolder of the app, create three .config files.

C. Use the ResourceManager class to retrieve localized strings from the code.

D. Use the x:Uid property for all of the controls that require localization.

E. Use the x:id property for all of the controls that require localization.

F. In a subfolder of the app, create three .resw files.

Correct Answer: ADFSection: [none]Explanation

Explanation/Reference:From scenario: The app interface must be available in English, Spanish, and French. A (not C): You can loadstring resources from objects such as resource files, libraries, controls, and Windows Store app packages and

Page 156: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

manifests.* Example: var res = Windows.ApplicationModel.ResourceLoader('Errors'); res.GetString('AlreadyRegistered');D (not E): x:Uid directiveProvides a unique identifier for markup elements. For Windows Runtime XAML, this unique identifier is used byXAML localization processes and tools, such as using resources from a .resw resource file.F (not B): Windows Store apps that use XAMLFor Windows Store apps that use XAML, you localize these fields in resources.resw files by using the ResourceEditor. To create the United States English version of the manifest fields, you would add an en-us\resources.resw file.

http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh965326.aspx

QUESTION 86You create the following method in a Utility class: (Line numbers are included for reference only.)

You need to complete the code to meet the requirement for displaying the last 10 viewed pictures.

What code should you add to line 04? (More than one answer choice may achieve the goal.Select the BEST answer.)

A. StorageApplicationPermissions.FutureAccessList.Add(file, file.Name);

B. StorageApplicationPermissions.MostlyRecentlyUsedl_ist.Add(file, file.Name);

C. StorageItemMostRecentlyUsedList.Entries.Add(file, file.Name);

D. StorageItemAccessList.Entries.Add(file, file.Name);

Correct Answer: ASection: [none]Explanation

Explanation/Reference:http://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.accesscache.storageapplicationpermissions.futureacce sslist.aspx

QUESTION 87You need to configure Package.appxmanifest to support the download of pictures. The solution must meet thegeneral requirements.

Which code segment should you add to line 04? (More than one answer choice may achieve the goal. Selectthe BEST answer.)

A. <Task Type="timer" />

B. <Task Type="SystemEvent" />

C. <Task Type="deviceUse" />

D. <Task Type="pushNotification" />

Correct Answer: DSection: [none]Explanation

Explanation/Reference:http://msdn.microsoft.com/en-us/library/windows/apps/br211469.aspx

Page 157: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

QUESTION 88You add a button named btnDownloadTours to the search results page.

You create a method named DownloadTour to download video tours synchronously.

DownloadTour receives a single parameter of type integer, representing the ID of a video tour. As customersadd listings to their favorites list, the ID of the video tour is added to a collection named selectedTours.

You need to implement the code required to download the video tour based on the video tour requirements.

What code should you add to the Click event of btnDownloadTours? (More than one answer choice mayachieve the goal. Select the BEST answer.)

A. Option A

B. Option B

C. Option C

D. Option D

Correct Answer: CSection: [none]Explanation

Explanation/Reference:http://msdn.microsoft.com/en-us/library/system.threading.tasks.task(v=vs.110).aspx http://msdn.microsoft.com/en-us/library/dd270695(v=vs.110).aspx

QUESTION 89You create a mobile service to send push notifications to the app.

Page 158: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

You configure the service and the app to work with Windows Push Notification Services (WNS).

You add the following code to the App.xaml.cs file:

You need to ensure that the app can access the push notification channel.

What should you do first?

A. Add a call to GetChannel in the OnLaunched event handler of the app.

B. Set the Uri property of pushChannel in the OnActivated event handler of the app.

C. Set the Uri property of pushChannel in the OnLaunched event handler of the app.

D. Add a call to GetChannel in the OnActivated event handler of the app.

Correct Answer: ASection: [none]Explanation

Explanation/Reference:http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.application.onlaunched.aspx

QUESTION 90You are developing a Windows Store app that uses a webcam.

You need to be notified if new webcams are connected to the system.

Which class should you use?

A. ManagementObjectFinder

B. FileSystemWatcher

C. DeviceWatcher

D. ServiceDevice

Correct Answer: CSection: [none]Explanation

Explanation/Reference:http://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.enumeration.devicewatcher.aspx

QUESTION 91You are preparing a Windows Store game update for deployment. Game performance must be analyzed byusing a profiling tool.

Page 159: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

You need to ensure that you collect the most accurate performance data for the analysis.

Which Visual Studio project configuration options should you use? (Each correct answer presents part of thesolution. Choose all that apply.)

A. Choose the Simulator deployment target for the game.

B. Use the Release build of the game.

C. Use the Debug build of the game.

D. Choose the Local Machine deployment target for the game.

Correct Answer: BDSection: [none]Explanation

Explanation/Reference:http://msdn.microsoft.com/en-us/library/windows/apps/xx130654.aspx#Performance

QUESTION 92You are preparing to deploy a Windows Store app to the marketplace.

You need to ensure that unhandled errors and exceptions are never displayed to users.

What should you do?

A. In the app object, wrap the call to the Window.Current.Activate() method in a try-catch statement to handleany exceptions that occur.

B. Open the Exceptions window in Visual Studio and clear the check box for unhandled exceptions for theCommon Language Runtime.

C. Write a handler for the UnhandledException event and set the Handled property on theUnhandledExceptionEventArgs object to true.

D. Write a handler for the UnhandledException event and set the CancelBubble property on theUnhandledExceptionEventArgs object to true.

Correct Answer: CSection: [none]Explanation

Explanation/Reference:http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.unhandledexceptioneventargs.handled.aspx

QUESTION 93You are developing a Windows Store app that allows users to compose musical beats and rhythms.

The app must meet the following requirements:The app must save the work in progress in case the app suspends or terminates before users save their work.If the app closes before the work is complete, work in progress should be automatically reloaded so that userscan continue seamlessly from where they left off. Users should be able to resume work on another device withthe app installed, provided that the user supplies the same credentials on both machines.

You need to ensure that the app meets the requirements.

How should the app save the work in progress?

A. by storing it in a memory-mapped file

B. by serializing it to a temporary app store

Page 160: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

C. by serializing it to the roaming app store

D. by serializing it to the local app store

Correct Answer: CSection: [none]Explanation

Explanation/Reference:http://msdn.microsoft.com/en-us/library/windows/apps/hh465094.aspx

QUESTION 94You are designing a Windows Store app that creates large amounts of temporary binary data each time it isrun.

You need to ensure that data is persisted while the app is running but deleted when the app is closed.

Which app data storage mechanism should you use? (Each correct answer presents a complete solution.Choose all that apply.)

A. a temporary app data store

B. the app files of the local app data store

C. the app settings of the local app data store

D. a roaming app data store

Correct Answer: ABCSection: [none]Explanation

Explanation/Reference:http://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx

QUESTION 95You are developing a Windows Store app. The app has the following requirements:Files must be stored on a device's file system so other Windows Store apps can access them.Additional configuration must be performed to make the location of the files available to other Windows Storeapps.

You need to meet the requirements.

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

A. Removable devices

B. App data locations

C. User's download folder

D. Documents library

E. App install directory

Correct Answer: AESection: [none]Explanation

Explanation/Reference:http://msdn.microsoft.com/en-us/library/windows/apps/hh967755.aspx

QUESTION 96You are developing a Windows Store app that displays notifications on the lock screen.

Page 161: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

The app must execute a background task when the notification arrives. In addition, the app must receive pushnotifications from Windows Push Notification Service (WNS).

You need to use a push notification mechanism that meets the requirements.

Which push notification mechanism should you use?

A. Toast notification

B. Raw notification

C. Tile update

D. Badge update

Correct Answer: BSection: [none]Explanation

Explanation/Reference:http://msdn.microsoft.com/en-us/library/windows/apps/jj676791.aspx

QUESTION 97You are developing a Windows Store app that prints documents. An object named printManager manages theprint flow. An object named printDocument sends output to the printer.

You need to ensure that the app allows the user to preview the print layout of the entire document.

Which event should you handle to construct the print preview of the entire document?

A. printDocument.GetPreviewPage

B. printManager.PrintTaskRequested

C. printDocument.Paginate

D. printDocument.AddPages

Correct Answer: CSection: [none]Explanation

Explanation/Reference:http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.printing.printdocument.paginate.aspx

QUESTION 98You are developing a Windows Store app that uses the Windows Push Notification Service (WNS) to sendtoast notifications.

You need to ensure that the requests that the app sends to the WNS follow the authorization standard thatWNS supports.

Which authorization standard should you use?

A. ADFS

B. ws-Trust

C. openID

D. OAuth 2.0

Correct Answer: D

Page 162: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Section: [none]Explanation

Explanation/Reference:http://msdn.microsoft.com/en-us/library/windows/apps/hh913756.aspx

QUESTION 99You are developing a Windows Store app that requires access to a user's location.

A user denies the app access to the location service.

You need to handle the error that results when the app calls the GetGeopositionAsync() method.

What should you do?

A. Modify the app manifest to enable Location services and query the user.

B. Display an interface for the user to enable location and rerun the method.

C. Catch the exception using a try-catch statement.

D. Modify the app.config file to enable Location services and query the user.

E. Catch the exception using a try-catch async statement.

Correct Answer: CSection: [none]Explanation

Explanation/Reference:http://msdn.microsoft.com/en-us/library/system.exception(v=vs.110).aspx

QUESTION 100You 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 isviewing 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

Correct Answer: BSection: [none]Explanation

Explanation/Reference:

QUESTION 101You are developing an ASP.NET MVC web application in Visual Studio 2012. The application requires severalthousand 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.

Page 163: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

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.

Correct Answer: CSection: [none]Explanation

Explanation/Reference:

QUESTION 102You are designing an HTML5 website.

You need to design the interface such that the content is viewable in all types of browsers, including screenreaders.

What should you do? (Each correct answer presents a complete solution. Choose all that apply.)

A. Ensure that content elements have valid and descriptive names.

B. Use Resource Description Framework (RDF) to describe content elements.

C. Convert HTML forms to XForms.

D. Use HTML5 semantic markup elements.

E. Annotate content elements with Accessible Rich Internet Application (ARIA) attributes.

Correct Answer: DESection: [none]Explanation

Explanation/Reference:

QUESTION 103You are developing an ASP.NET MVC application in Visual Studio 2012. The application supports multiplecultures.

The application contains three resource files in the Resources directory:ProductDictionary.resxProductDictionary.es.resxProductDictionary.fr.resx

Each file contains a public resource named Currency with the localized currency symbol. The application isconfigured 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.)

Page 164: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

You need to set ViewBag.LocalizedCurrency to the localized currency contained in the resource files.Which code segment should you add to the action at line 03?

A. ViewBag.LocaIizedCurrency = Resources.ProductDictionary.Currency;

B. VievBag.LocalizedCurrency = HttpContext.GetGlobalResourceObject("ProductDictionary", "Currency", newSystem.Globalization.CultureInfo(Men"));

C. VievBag.LocalizedCurrency = HttpContext.GetLocalResourceObject("ProductDictionary", "Currency");

D. ViewBag.LocalizedCurrency = HttpContext.GetGlobalResourceObject("ProductDictionary", "Currency");

Correct Answer: ASection: [none]Explanation

Explanation/Reference:

QUESTION 104You 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

Correct Answer: BSection: [none]Explanation

Explanation/Reference:answer is modified.

QUESTION 105You are developing an ASP.NET MVC application that will be deployed on a web farm. Passwords must bestored 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. Aspnet_regbrowsers.exe

C. Aspnet_setreg.exe

D. Aspnet_compiler.exe

Page 165: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Correct Answer: ASection: [none]Explanation

Explanation/Reference:

QUESTION 106You are developing an ASP.NET MVC application that uses forms authentication to verify that the user islogged 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

Correct Answer: ABSection: [none]Explanation

Explanation/Reference:

QUESTION 107You are developing an ASP.NET MVC application that uses forms authentication. The application uses SQLqueries that display customer order data.

Logs show there have been several malicious attacks against the servers.

You need to prevent all SQL injection attacks from malicious users against the application.How should you secure the queries?

A. Check the input against patterns seen in the logs and other records.

B. Escape single quotes and apostrophes on all string-based input parameters.

C. Implement parameterization of all input strings.

D. Filter out prohibited words in the input submitted by the users.

Correct Answer: CSection: [none]Explanation

Explanation/Reference:SQL Injection Prevention, Defense Option 1: Prepared Statements (Parameterized Queries) The use ofprepared statements (aka parameterized queries) is how all developers should first be taught how to writedatabase queries. They are simple to write, and easier to understand than dynamic queries. Parameterizedqueries force the developer to first define all the SQL code, and then pass in each parameter to the query later.This coding style allows the database to distinguish between code and data, regardless of what user input issupplied.

Page 166: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Prepared statements ensure that an attacker is not able to change the intent of a query, even if SQLcommands are inserted by an attacker.

Reference: SQL Injection Prevention Cheat Sheet

QUESTION 108You are developing an ASP.NET MVC application that uses forms authentication against a third-partydatabase.

You need to authenticate the users.

Which code segment should you use?

A. Option A

B. Option B

C. Option C

D. Option D

Correct Answer: CSection: [none]Explanation

Explanation/Reference:Class ProviderBaseThe provider model is intended to encapsulate all or part of the functionality of multiple ASP.NET features, suchas membership, profiles, and protected configuration.

QUESTION 109You are designing an enterprise-level Windows Communication Foundation (WCF) application. User accountswill migrate from the existing system. The new system must be able to scale to accommodate the increasingload.

You need to ensure that the application can handle large-scale role changes.

What should you use for authorization? (Each correct answer presents a complete solution.Choose all that apply.)

A. Resource-based trusted subsystem model

Page 167: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

B. Identity-based approach

C. Role-based approach

D. Resource-based impersonation/delegation model

Correct Answer: BCSection: [none]Explanation

Explanation/Reference:Advanced Maturity: Authorization as a ServiceIn the advanced level of maturity for authorization, role storage and management is consolidated andauthorization itself is a service available to any solution that is service-enabled.

* The Trusted Subsystems Model

Once authorization is available as an autonomous service, the need for impersonation is eliminated. Instead ofassuming the identity of the user, the application uses its own credentials to access services and resources, butit captures the user's identity and passes it as a parameter (or token) to be used for authorization when arequest is made. This model is referred to as the trusted subsystem model, because the application acts as atrusted subsystem within the security domain.

QUESTION 110You are developing an ASP.NET MVC application to be used on the Internet. The environment uses ActiveDirectory with delegation to access secure resources.

Users must be able to log on to the application to maintain their personal preferences.

You need to use the least amount of development effort to enable users to log on.

What should you do?

A. Enable Forms authentication

B. Enable Windows authentication

C. Generate server SSL certificates and install them in IIS

D. Enable Digest authentication

Correct Answer: BSection: [none]

Page 168: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Explanation

Explanation/Reference:Requirements for Delegation

Delegation relies on Integrated Windows authentication to access resources. There is no limit on the number ofcomputers that you can delegate your account -- you must correctly configure each of them. The IntegratedWindows authentication method works only if the following two conditions exist:/ You set up your network to use the Kerberos authentication protocol that requires Active Directory./ You set up the computers and accounts on your network as trusted for delegation.

QUESTION 111You are developing a controller for an ASP.NET MVC application that manages message board postings.

The security protection built in to ASP.NET is preventing users from saving their HTML. You need to enableusers to edit and save their HTML while maintaining existing security protection measures.

Which code segment should you use?

Page 169: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

A. Option A

B. Option B

C. Option C

D. Option D

Correct Answer: BSection: [none]Explanation

Explanation/Reference:

QUESTION 112You are designing an MVC web application.

The view must be as simple as possible for designers who do not have a technical background.

You need to combine two existing models to meet the requirement.

Which component of the MVC framework should you use?

A. View

B. View Model

C. Controller

D. Model

Correct Answer: BSection: [none]Explanation

Explanation/Reference:

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

You need to test the GoldMined method.

Which unit test should you use?

Page 170: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications
Page 171: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

A. Option A

B. Option B

C. Option C

D. Option D

Correct Answer: DSection: [none]Explanation

Explanation/Reference:

QUESTION 114You 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?

A. From the Debug menu in Visual Studio 2012, select Exceptions. Enable the Thrown check box for CommonLanguage Runtime Exceptions.

B. From the DEBUG menu in Visual Studio 2012, select Attach to Process. Select the IIS process.

C. From the Debug menu in Visual Studio 2012, select Exceptions. Disable the User-unhandled check box forCommon Language Runtime Exceptions.

D. From the TOOLS menu in Visual Studio 2012, click Customize. C!ic< tie Commands tab and select Debug.

Correct Answer: ASection: [none]Explanation

Explanation/Reference:

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

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

Page 172: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

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

Correct Answer: DSection: [none]Explanation

Explanation/Reference:

QUESTION 116You are designing a distributed banking application that handles multiple customers. A user may log on to thesite to perform activities such as checking balances, performing transactions, and other activities that must bedone securely.

The application must store secure information that is specific to an individual user. The data must beautomatically and securely purged when the user logs off.

You need to save transient information in a secure data store.

Page 173: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

Which data store should you use?

A. .NET session state

B. .NET profile properties

C. .NET application state

D. Shared database

Correct Answer: ASection: [none]Explanation

Explanation/Reference:

QUESTION 117You are developing an ASP.NET MVC application.

The application must allow users to enter HTML in a feedback text box only.

You need to disable request validation.

What should you do?

A. Use the HttpRequest.Form property to read the unvalidated form value.

B. Apply and set the Validatelnput attribute on the controller action to FALSE.

C. Use the HttpRequest.Unvalidated property to read the unvalidated form value.

D. Apply and set the CausesValidation attribute on the controller action to FALSE.

Correct Answer: CSection: [none]Explanation

Explanation/Reference:The HttpRequest.Unvalidated Property provides access to HTTP request values without triggering requestvalidation.

QUESTION 118You are developing an ASP.NET MVC application that supports multiple cultures and multiple languages. Theapplication 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

Correct Answer: BSection: [none]Explanation

Explanation/Reference:

Page 174: BrainDumps.70-486. · PDF fileBrainDumps.70-486.154.QA Number: 70-486 Passing Score: 800 Time Limit: 120 min File Version: 21.14 70-486 Developing ASP.NET MVC 4 Web Applications

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

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

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