Q1. HOTSPOT - (Topic 4)
You are optimizing an Internet-facing website for search engine optimization.
You are reading a Site Analysis Report from the SEO Toolkit. The report returns warnings that indicate the website HTML lacks key information necessary for search engine indexing.
You need to improve the optimization of the site.
What should you do? (To answer, select the appropriate option from the drop-down list in the answer area.)
Answer:
Q2. - (Topic 4)
You are developing an application that uses many small images.
When the images load, the application runs slowly.
You need to improve the performance of the application.
What should you do?
A. Preload all the images when the application starts to ensure that the images are cached.
B. Convert the images to ICO file format and stream all images on a single connection.
C. Host all images on a Microsoft Azure web role with multiple instances.
D. Combine all the images into a single image and use CSS to create sprites.
Answer: D
Explanation: Because browsers limit how many concurrent HTTP requests they make to a website, a web page with many small icon images can result in a longer load time. You can combine many small images into a single larger image - a CSS sprite - using the free ASP.NET Sprite and Image Optimization Library available from Microsoft.
Reference: CSS Sprites and the ASP.NET Sprite and Image Optimization Library
http://dotnetslackers.com/articles/aspnet/CSS-Sprites-and-the-ASP-NET-Sprite-and-Image-Optimization-Library.aspx
Q3. - (Topic 4)
You 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
Answer: C
Explanation:
http://msdn.microsoft.com/en-us/magazine/cc163665.aspx http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.testtools.unittesting.assert.areequal(v=vs.110).aspx
Q4. - (Topic 4)
You are developing an ASP.NET MVC application that will be deployed on a web farm.
Passwords must be stored in the web.config file and must not be readable or in a format
that is easily decodable.
You need to encrypt the passwords that are stored in the web.config file.
Which command-line tool should you use?
A. Aspnet_regiis.exe
B. Aspnet_regbrowsers.exe
C. Aspnet_setreg.exe
D. Aspnet_compiler.exe
Answer: A
Q5. DRAG DROP - (Topic 3)
You 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 or attribute. Each value may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)
Answer:
Q6. - (Topic 4)
You are developing an ASP.NET MVC application that enables you to edit and save a
student object.
The application must not retrieve student objects on an HTTP POST request.
You need to implement the controller.
Which code segment should you use? (Each correct answer presents a complete solution.
Choose all that apply.)
A. Option A
B. Option B
C. Option C
D. Option D
Answer: C,D
Q7. - (Topic 4)
You are developing an ASP.NET MVC application that uses forms authentication to verify that the user is logged 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
Answer: A,B
Q8. - (Topic 3)
You need to ensure that developers can connect to a Microsoft Azure role by using RDP.
What should you do?
A. Export a certificate with a private key. Upload the .pfx file to the Certificates section under the TranscodeWorkerRole hosted service on the Azure Management Portal.
B. Export a certificate with a private key. Upload the .pfx file to the Management Certificates section on the Azure Management Portal.
C. Export a certificate without a private key. Upload the .cer file to the Management Certificates section on the Azure Management Portal.
D. Export a certificate without a private key. Upload the .cer file to the Certificates section under the TranscodeWorkerRole hosted service on the Azure Management Portal.
Answer: A
Explanation: In case you don’t want to use the RDP certificate created by Windows Azure Tools and want to use a custom certificate instead, the following steps will guide you. These steps can also be used in case package is not being published from Visual Studio rather it is being built locally, saved in either Local Machine's Drive or Windows Azure Blob Storage and subsequently published from there.
Here are the steps which are required to get pass the publishing error which you might be running into. You would need to upload the Certificate with Private Key to the portal (when Visual Studio is used this is done in the background).
Detailed steps.
1.
In Visual Studio, go to the solution which is being developed.
2.
Right click the Web Project -> Configure Remote Desktop -> click on View to see Certificate details (Since I don’t have a custom certificate I will use one create by Windows Azure Tools itself)
3.
Go to Details tab on Certificate -> Click Copy to file.. -> Next -> Select ‘Yes, export the private key’ -> Next -> Continue with default setting and create a password when asked (please refer below screenshots)
4.
These steps will generate a .PFX file for this certificate. Now we need to upload this certificate to the portal (for the respective cloud service)
5.
Go to the Azure Management Portal -> Go to the Cloud Service in question -> Certificates Tab -> Upload the newly created certificate (.PFX file)
Note:
*
The certificates that you need for a remote desktop connection are different from the certificates that you use for other Azure operations. The remote access certificate must have a private key.
*
Microsoft Azure uses certificates in three ways: / Management certificates – Stored at the subscription level, these certificates are used to enable the use of the SDK tools, the Windows Azure Tools for Microsoft Visual Studio, or the Service Management REST API Reference. These certificates are independent of any cloud service or deployment. / Service certificates – Stored at the cloud service level, these certificates are used by your deployed services. / SSH Keys – Stored on the Linux virtual machine, SSH keys are used to authenticate remote connections to the virtual machine.
Reference: How to use Custom Certificate for RDP to Windows Azure Roles
http://blogs.msdn.com/b/cie/archive/2014/02/22/how-to-use-custom-certificate-for-rdp-to-windows-azure-roles.aspx
Q9. DRAG DROP - (Topic 4)
You are developing an ASP.NET MVC application.
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 LogActionFilter class? (To answer, drag the appropriate code segments to the correct targets. 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:
Q10. - (Topic 4)
You are designing an enterprise-level Windows Communication Foundation (WCF) application. User accounts will migrate from the existing system. The new system must be able to scale to accommodate the increasing load.
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
Answer: A,C
Q11. HOTSPOT - (Topic 4)
You 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 the answer area.)
Answer:
Q12. - (Topic 4)
You 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 enable users to edit and save their HTML while maintaining existing security protection measures.
Which code segment should you use?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: B
Q13. 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:
Q14. HOTSPOT - (Topic 2)
You need to implement the mobile device support requirements.
How should you build the ProcessRequest method? (To answer, select the appropriate options in the answer area.)
Answer:
Q15. HOTSPOT - (Topic 4)
You are developing an ASP.NET MVC application. The application includes the following code. Line numbers are included for reference only.
You add the following markup to the system.web section of the web.config file:
For each of the following statements, select Yes if the statement is true. Otherwise, select No.
Answer:
Q16. - (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