1. Bundling and minification are two techniques you can use in ASP.NET 4.5 to:
2. As a best practice, all input validation should occur in which layer?
3. You 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 eliminate unnecessary header data, minimize latency, and transmit data over a full-duplex connection. What should you do?
4. Which is true about ModelState?
5. Where is data validation done?
6. What is the core process of rolling up a number of distinct resources together into a single downloadable resource in ASP.NET MVC?
7. A controller action can return:
8. Which of these formats is not supported out of the box by Web API?
9. Which HTML Helper would you use to create a form element in a View?
10. Which base class can be used for the return value of a MVC action method?
11. True or False? It is best practice to use model binding instead of manually parsing the request.
12. Which symbol[s] is used to designate Razor syntax code in a .cshtml file?
13. The MVC framework is defined in which namespace?
14. How can you restrict access to a Controller action so that only authorized users can call that action?
15. The order in which routes are defined matters.
16. True or False: By default, all controller classes must be named by using the "Controller" suffix.
17. What is the default view engine that comes with MVC3?
18. When creating a data-entry view for new data, which two HTTP request verbs (methods) should you anticipate using to serve the form to the user and allow the user to submit the form?
19. Which Razor construct is used to indicate a view is strongly-typed
20. In MVC, Which represents data that you want to have displayed on viewpage?
21. Which of these emulators are valid mobile emulators for MVC applications?
22. Which attribute could you use if you had a Phone Number property on your model and you wanted to validate the value against the United States phone format?
23. Which method in the RouteCollection can be used to prevent MVC from processing specific file types?
24. How do you prevent routing?
25. Which of the following regular expressions can be used as a constraint so that the route will match only when the "productId" parameter is numeric?
26. Which attribute could you use if you had a string property on your Model class named FirstName, but you want the labels for this property in your view to use the text "First Name"?
27. What is the first filter run in a controller action?
28. What enum represents a strongly-typed collection of the HTTP Status Codes?
29. Which namespace contains the attributes used to describe your model and it's properties?
30. What attribute is used to restrict access by callers to an action method?
31. Which of the following protocols are not supported by WCF?
32. How can you specify that a particular View should not use any implicitly set Layout View?
33. What is the type of the ViewBag property?
34. To accommodate large projects, ASP.NET MVC lets you partition Web applications into smaller units that are referred to as?
35. If you wish to include custom transformation logic in your Bundles, which interface could you implement?
36. What property could you set on the OutputCache attribute to indicate that you want it to instantiate new caches for different combinations of parameters to the Controller action method?
37. How is a model passed to a controller action validated?
38. If you have a _Layout.cshtml file in your shared views, which file can you create to have custom layout for mobile platforms?
39. 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?
40. If you have restricted a Controller so that all actions require the user to be authorized, how can you indicate that a specific action should be available without authorization?
41. Which class represents the result of a HTTP call to the Web API framework?
42. You are writing an action method called AddProduct inside the Product controller. The logic in your code indicates that you need to call the Cart controller’s Add method as a result of your controller’s action method. Which line of code would accomplish this?
43. Which class represents an initial HTTP class to the Web API framework?
44. [WebMethod] Attribute is required when calling an MVC Action with AJAX
45. Which class would you return from a Controller action when performing partial page updates?
46. If you wanted to use a partial view but also pass the same model object from the parent view, what HTML Helper would you use?
47. What attribute is used to handle an exception that is thrown by an action method?
48. Tempdata is used to:
49. What is OutputCacheAttribute used for?
50. Which class is NOT a child of ActionResult?
51. If you wish to create a Web API controller, what class would you derive your controller from?
52. If you wish for a ApiController action to be used for many different HTTP Verbs, which attribute would you set?
53. If you wish to leverage the OData standards for querying your REST service, what attribute could you use on your ApiController action?
54. If you wish to use a custom IoC container when the ASP.NET MVC engine is generating instances of your controller, what interface would you implement?
55. MVC Filters can only be applied to Actions
56. By default, where is TempData stored?
57. ActionResult is:
58. Which of these is NOT an view engine for MVC?
59. 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 short-term state information. You need to persist the application state during the session. What should you implement?
60. What class would you derive from if you wish to create a custom type for Web API's HTTP Content Negotiation?
61. If you wish to genrate links to related resources to add hypermedia to your REST service, what class could you use?
62. If you want to setup custom configuration for a controller (formatters, model binders, etc.) which interface would you attribute need to implement?
63. Which of these are NOT conditions in which it's recommended to use asynchronous methods?
64. Which of the following is NOT a way to pass information from a controller to a view to be used by the razor view engine?
65. Which class could you use to create rules for using custom display modes?
66. The UIHint attribute is used to do what?
67. 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?
68. If you wish to write a module for your own custom logging or message headers, which interface could you implement?
69. Which HTML Helper would you use if you want the MVC engine to dynamically generate a form for an entire object based upon the metadata of the object's type?
70. What is ChildActionOnlyAttribute?
71. How do you catch unhandled action exceptions in a controller?
72. Which class is used by the MVC pipeline to call a resolved controller's action as the result of a HTTP request?
73. Any method that is decorated with ChildActionOnlyAttribute can be called ONLY using:
74. When declaring routes, what are constraints used for?
75. How do you prevent forgery of a request?
76. When you implement your own Model Binder, what method do you have to implement?
77. RenderAction method is used to:
78. Which of the following is NOT a member of the UrlHelper class.
79. Which static class could you use to enable OAuth support for clients such as Twitter & Facebook?
80. An MVC application can have a:
81. Recipe is available in:
82. Where are the routing rules defined in an asp.net MVC application?
83. What is the purpose of _ViewStart.cshtml?
84. Which of these is a property of OutputCache attribute?
85. Which attribute could you use if you had a property on your Model class that you wish to be hidden when using the EditorForModel HTML Helper method?
86. An MVC Filter can only be applied as an Attribute above an Action or Controller
87. You are developing an ASP.NET MVC 2 application. A view contains a form that allows users to submit their first name. You need to display the value that is submitted, and you must ensure that your code avoids crosssite scripting. Which code segment should you use?
88. What type of filter should be used if you want to modify the result of an action method?
89. What is the advantage of InProc Session Storage over the other built-in methods?
90. The advantage of using read-only attribute for session state is:
91. Which property can you set on the BundleCollection class to indicate that you wish to enable support for CDN scripts or styles?
92. Which method is NOT valid in the context of an MVC view?
93. Which class is used by the MVC pipeline to map data from a HTTP request to the parameters in a controller's action method?
94. You are authoring unit tests. The unit tests must test code that consumes sealed classes. You need to create, maintain, and inject dependencies in the unit tests.
95. RenderPartial method:
96. What does "Remote" attribute do?
97. Which class contains information about the HTTP request that is parsed and inspected by the MVC pipeline when determining which controller and action to invoke?
98. What is the most scalable way to share Session information in a web farm?
99. You 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?
100. True or False? You can use routing and "web.config" files to secure your MVC application.
101. ASP.NET MVC Framework implements a(n):
102. An anti-forgery token is useful for
103. The ASP.NET run-time detects the browser user-agent using
104. How to preserve session in TempData for consecutive requests