Q21. - (Topic 3)
You are creating a new authentication system that uses an HTTP header value.
The existing authentication system must continue to operate normally.
You need to implement the custom authentication.
What should you do? (Each correct answer presents a complete solution. Choose all that
apply.)
A. Create a class derived from ActionResult and check for a valid HTTP header value in the ExecuteResult method. Change all actions to return this new class.
B. Create an HttpHandler to check for a valid HTTP header value in the ProcessRequest method.
C. Create an HttpModule and check for a valid HTTP header value in the AuthenticateRequest event.
D. Create a class derived from AuthorizeAttribute and check for a valid HTTP header value in the AuthorizeCore method. Change usages of the existing AuthorizeAttribute to use the new class.
Answer: C,D
Q22. DRAG DROP - (Topic 1)
You 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 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:
Q23. - (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. $("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 });
Answer: B,C
Q24. DRAG DROP - (Topic 4)
You are developing an ASP.NET MVC application in Visual Studio. The application supports multiple cultures.
To set the culture, the application must use the AcceptLanguage 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 markup? To answer, drag the appropriate markup segments to the correct targets. Each markup segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
Answer:
Q25. - (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
Q26. - (Topic 4)
You 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
Answer: B
Q27. - (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
Q28. - (Topic 4)
You are developing an ASP.NET MVC web application in Visual Studio 2012. The application requires several thousand 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. 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.
Answer: C
Q29. DRAG DROP - (Topic 3)
You need to ensure that the transcode.exe utility is installed before the worker role starts. You have the following markup:
Which markup segments should you include in Target 1, Target 2, Target 3, Target 4 and Target 5 to implement the startup task? To answer, drag the appropriate markup segments to the correct targets. Each markup segments may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
Answer:
Topic 4, Mixed Questions
Q30. - (Topic 2)
You 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.)
A. Option A
B. Option B
C. Option C
D. Option D
Answer: A,D