Q1. DRAG DROP - (Topic 4)
You 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 the script 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 the appropriate styles to the correct targets. Each style may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)
Answer:
Q2. - (Topic 4)
You are developing an ASP.NET MVC application that uses forms authentication. The application uses SQL queries that display customer order data.
You need to prevent all SQL injection attacks against the application.
How should you secure the queries?
A. Implement parameterization.
B. Pattern check the input.
C. Filter out prohibited words in the input.
D. Escape single quotes on string-based input parameters.
Answer: A
Explanation: With most development platforms, parameterized statements that work with parameters can be used (sometimes called placeholders or bind variables) instead of embedding user input in the statement. A placeholder can only store a value of the given type and not an arbitrary SQL fragment. Hence the SQL injection would simply be treated as a strange (and probably invalid) parameter value.
Reference: https://en.wikipedia.org/wiki/SQL_injection#Parameterized_statements
Q3. DRAG DROP - (Topic 1)
You need to implement security according to the business requirements.
How should you modify RunLogController? (To answer, drag the appropriate code segment to the correct location or locations. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)
Answer:
Topic 2, Web Application
Background
You are developing an online shopping web application.
Business Requirements
A user is not required to provide an email address. If a user enters an email
address, it must be verified to be a valid email address.
Information about the first product on the product page must fade out over time to
encourage 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 server affinity.
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 devices must 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
Q4. DRAG DROP - (Topic 1)
You 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 location or locations. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)
Answer:
Q5. - (Topic 3)
Customers download videos by using HTTP clients that support various content encodings. You need to configure caching on the DownloadVideo action to maximize performance. Which attribute should you add?
A. Option A
B. Option B
C. Option C
D. Option D
E. Option E
Answer: B
Q6. - (Topic 4)
You are designing a distributed application.
The application must store secure information that is specific to an individual user. The data must be automatically 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
Answer: B
Q7. DRAG DROP - (Topic 4)
You are developing an ASP.NET web application that uses health monitoring to log events to the Windows Event Log. The application contains a custom event that is defined in the following code segment. Line numbers are included for reference only.
You need to ensure that the event is correctly added to the Windows event log.
How should you complete the relevant code? To answer, drag the appropriate code segment to the correct location or locations. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
Answer:
Q8. - (Topic 2)
The 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 that apply.)
A. Option A
B. Option B
C. Option C
D. Option D
Answer: C,D
26. - (Topic 2)
You need to add a method to the ProductController class to meet the exception handling requirements for logging.
Which code segment should you use?
A. Option A
B. Option B
C. Option C
D. Option D
Q9. - (Topic 4)
You are developing an Azure worker role. You enable crash dump collection for the role.
When the role starts, an external application stops responding.
You need to download the crash dump to determine why the application stops responding.
From which two locations can you download the crash dump? Each correct answer presents a complete solution.
A. Azure Blob storage
B. the temp folder on the virtual machine that is running the role instance
C. Azure file storage
D. the DiagnosticStore local resource folder on the virtual machine that is running the role instance
Answer: A,D
Explanation: When you enable collection of crash dumps, the resulting data is written to the CrashDumps directory in the DiagnosticStore local resource that is automatically configured for your role. When crash dump data is transferred to persistent storage, it is stored to the wad-crash-dumps Blob container.
Reference: CrashDumps.EnableCollection Method
https://msdn.microsoft.com/library/microsoft.windowsazure.diagnostics.crashdumps.enable collection.aspx
Q10. - (Topic 1)
The RunLog/Views/InsertLog.cshtml view must display the /Images/stopwatch.png image and the “Insert Run Data” header text below the image. The view should resemble the exhibit. (Click the Exhibit button.)
The application must display the image above the field set.
You need to add the HTML code to /Runlog/Views/InsertLog.cshtml to display the image
and header text.
Which code segment should you use?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: D
Explanation: Example:
<div style="background-image: url(../images/test-background.gif); height: 200px; width:
400px; border: 1px solid black;">Example of a DIV element with a background
image:</div>
<div style="background-image: url(../images/test-background.gif); height: 200px; width:
400px; border: 1px solid black;"> </div>
Reference: DIV BACKGROUND-IMAGE in the STYLE element
http://www.w3.org/WAI/UA/TS/html401/cp0301/0301-CSS-DIV-BACKGROUND-IMAGE.html
Q11. - (Topic 4)
You are developing an ASP.NET MVC web application for viewing a list of contacts. The application is designed for devices that support changes in orientation, such as tablets and smartphones. The application displays a grid of contact tiles in portrait mode.
When the orientation changes to landscape, each tile in the grid expands to include each contact's details. The HTML that creates the tiled interface resembles the following markup.
The CSS used to style the tiles in landscape mode is as follows.
If this CSS is omitted, the existing CSS displays the tiles in portrait mode.
You need to update the landscape-mode CSS to apply only to screens with a width greater than or equal to 500 pixels.
Which code segment should you use?
A. @media screen and (width >= 500px) { … }
B. @media screen and (min-width: 500px) { … }
C. @media screen(min-width: 500px, max-width: 1000px) { … }
D. @media resolution(min-width: 500px) { … }
Answer: B
Explanation: http://www.javascriptkit.com/dhtmltutors/cssmediaqueries.shtml
Q12. DRAG DROP - (Topic 4)
You are developing an ASP.NET MVC application that takes customer orders.
Orders are restricted to customers with IP addresses based in the United States.
You need to implement a custom route handler.
How should you implement the route handler? (To answer, drag the appropriate line of code to the correct location or locations. Each line of code may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)
Answer:
Q13. - (Topic 4)
You 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
Answer: B
Q14. DRAG DROP - (Topic 4)
You are developing an ASP.NET MVC web application in Visual Studio 2012.
The application has a model named ReservationLocation that contains properties named City and State.
The view that displays reservations has a single text box named loc for entering the location information. The location is entered as city, state.
There are action methods that have ReservationLocation as a parameter type.
You need to ensure that the City and State properties are correctly populated.
How should you implement model binding for the ReservationLocation type? (To answer, drag the appropriate code segment to the correct location or locations. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)
Answer:
Q15. - (Topic 2)
You need to configure session storage in the web.config file to meet the technical requirements for scalability.
Which SessionState mode should you use? (Each correct answer presents a complete solution. Choose all that apply.)
A. StateServer
B. InProc
C. AutoDetect
D. SqlServer
Answer: A,D
Q16. - (Topic 2)
You 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);
Answer: A,D
Topic 3, Video Transcoding Service
Background
You 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 the world.
Business Requirements
The user-facing portion of the application is an ASP.NET MVC application. It provides an interface for administrators to upload video and schedule transcoding. It also enables administrators and users to download the transcoded videos.
When videos are uploaded, they are populated with metadata used to identify the video. The video metadata is gathered 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. This information is read from a cookie that is set on the server. The administrative links must not be present if an error 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 is installed, 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 be unregistered when it is not in use. The transcoding utility requires a significant amount of resources. A maximum of 10 instances of the utility can be running at any one time. If an instance of the role cannot process an additional video, it must not prevent any other 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:
. Developers must use Microsoft Remote Desktop Protocol (RDP) to view errors generated by the transcode.exe utility.
. 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