Q1. - (Topic 3)
You need to ensure that all the MVC controllers are secure.
Which code segment should you use as the body for the CreateController method in AdminVerifierFactory.cs?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: C
Q2. DRAG DROP - (Topic 4)
You are developing an ASP.NET MVC application that allows users to log on by using a third-party authenticator.
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 of actions to the answer area and arrange them in the correct order.)
Answer:
Q3. - (Topic 2)
You need to modify the application to meet the productId requirement.
What should you do?
A. Modify the RegisterGlobalFilters method of the Global.asax.cs file as follows. Contract.Assume<ArgumentException>(productId != 0);
B. Modify the GetDealPrice method of ProductController as follows. Contract.Requires<ArgumentException>(productId > 0);
C. Modify the RegisterGlobalFilters method of the Global.asax.cs file as follows. Contract.Requires<ArgumentException>(productId > 0);
D. Modify the GetDealPrice method of ProductController as follows. Contract.Assume<ArgumentException>(productId > 0);
Answer: B
Explanation:
The Contract.Requires(Of TException) method specifies a precondition contract for the enclosing method or property, and throws an exception if the condition for the contract fails. Syntax: 'Declaration Public Shared Sub Requires(Of TException As Exception) ( _ condition As Boolean _) Type Parameters TException The exception to throw if the condition is false. Parameters condition Type: System.Boolean The conditional expression to test.
Reference: Contract.Requires(Of TException) Method (Boolean)
Q4. - (Topic 4)
You are developing an ASP.NET MVC application. The application is deployed in a web farm and is accessed by many users.
The application must handle web server failures gracefully. The servers in the farm must share the state information.
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
Answer: A
Q5. HOTSPOT - (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, select the appropriate option from the drop-down list in the answer area.)
Answer:
Q6. HOTSPOT - (Topic 4)
You are developing an ASP.NET MVC application that authenticates a user by using claims-based authentication.
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 list in the answer area.)
Answer:
Q7. - (Topic 4)
You 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
Answer: B
Explanation: http://msdn.microsoft.com/en-us/library/aa292114(v=vs.71).aspx
Q8. - (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
Q9. HOTSPOT - (Topic 1)
You 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.)
Answer:
Q10. HOTSPOT - (Topic 4)
You are developing an ASP.NET MVC application that has pages for users who browse the site with Windows Phone 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.)
Answer:
Q11. - (Topic 4)
You 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 complete solution. 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
Answer: B,D
Explanation: SQL Database provides a relational database management system for Windows Azure and is based on SQL Server technology. With a SQL Database instance, you can easily provision and deploy relational database solutions 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 familiar with tracking user activity and actions across several request-response exchanges that occur in Web applications. Since HTTP is a stateless protocol, developers over the years have developed all sorts of means to manage state. You'll even find an MSDN page providing alternatives and recommendations for state management 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.
Q12. - (Topic 2)
When users attempt to retrieve a product from the product page, a run-time exception
occurs if the product does not exist.
You need to route the exception to the CustomException.aspx page.
Which method should you add to MvcApplication?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: B
Q13. - (Topic 4)
You are developing an ASP.NET MVC application.
The application provides a RESTful API for third-party applications. This API updates the information for a contact by embedding the information in the URL of an HTTP POST.
You need to save the Contact type when third-party applications use the EditContact method.
Which code segment should you use? {Each correct answer presents a complete solution. Choose all that apply.)
A. Option A
B. Option B
C. Option C
D. Option D
Answer: B,D
Explanation: Basics of RESTful services:
REST stands for Representational State Transfer, it is a simple stateless architecture that runs over HTTP where each unique URL is representation of some resource. There are four basic design principles which should be followed when creating RESTful service:
* Use HTTP methods (verbs) explicitly and in consistent way to interact with resources
(Uniform Interface), i.e. to retrieve a resource use GET, to create a resource use POST, to
update a resource use PUT/PATCH, and to remove a resource use DELETE.
Etc.
Q14. - (Topic 3)
You need to ensure that all the MVC controllers are secure.
Which code segment should you use as the body for the CreateController method in AdminVerifierFactory.es?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: C
Q15. 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:
Q16. - (Topic 3)
You need to maximize performance of video delivery.
Which code segment should you use as the body of the GetVideoStream function in the Video-Controller class?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: D