- MVC Framework Tutorial
- MVC Framework - Home
- MVC Framework - Introduction
- MVC Framework - Architecture
- MVC Framework - ASP.NET Forms
- MVC Framework - First Application
- MVC Framework - Folders
- MVC Framework - Models
- MVC Framework - Controllers
- MVC Framework - Views
- MVC Framework - Layouts
- MVC Framework - Routing Engine
- MVC Framework - Action Filters
- Advanced Example
- MVC Framework - Ajax Support
- MVC Framework - Bundling
- Exception Handling
- MVC Framework Useful Resources
- Questions & Answers
- MVC Framework - Quick Guide
- MVC Framework - Resources
- MVC Framework - Discussion
MVC Framework Online Quiz
Following quiz provides Multiple Choice Questions (MCQs) related to MVC Framework. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.
Q 1 - You are designing an application in which a section of the main page will be populated by content from a third-party provider. You do not have control over the responsiveness of the client or how much information will be returned with each request. The call is to a Restful service and will return the information formatted in Extensible Markup Language (XML). What is the best way to implement this application?
B - Put a synchronous service call into the main page controller.
Answer : A
Explanation
A.Because you do not have control over the responsiveness of the third- party provider and you do not know how much data might be returned from each call, you should wrap the call in the asynchronous framework. Providing the data in a strongly-typed model gives it more flexibility than working with the raw XML on the client side.
Q 2 - As you design a session-less state management system, what do you need to ensure that your application manages? (Choose all that apply.)
C - The session setting within the Web.config file
D - An identifier used by the server to identify the request
Answer : E
Explanation
E.Your application needs to manage whatever information might be re- quired to access the state management system.Your application needs to manage the passing of the identifier between requests.
Q 3 - Layout.cshtml and Site.Master are the two default template pages in ASP.NET MVC. Which of the following scenarios would best be solved using a single layout or master template? (Choose all that apply.)
Answer : E
Explanation
E.Adding logic to the master page to determine the menu design enables your application to display a menu section that changes based on the area of the application the user is visiting.Referencing all style pages in a single place, the layout page, is an appropriate use.
Q 4 - You have been asked by a company to evaluate its web application as a user. The company wants you to review the website from outside its network and identify areas that might be problematic. You have been asked to consider SEO and accessibility. Which tools would be helpful for your review? (Choose all that apply.)
Answer : B
Explanation
B.The Internet Explorer F12 tool enables you view HTML and CSS code, which can help you detect structural problems or errors that might affect acces- sibility or SEO.
Q 5 - You are developing an ASP.NET MVC application and you need to create satellite assemblies from resource files. What code should you use?
A - mage.exe /n: /embed:strings.de-DE.resources MyApp.de-DE.resources.dll
B - WinRes.exe /t: embed:strings.de-DE.resources /culture:de-DE
C - Lc.exestrings.de-DE.resourcesMyApp.de-DE.resources.dll
D - al.exe /t:lib /embed:strings.de-DE.resources /culture:de-DE /out:MyApp.de-DE. resources.dll
Answer : D
Explanation
D.Assembly Linker generates modules or resource files.
Q 6 - You are re-creating an application that was originally built with ASP 2.0. You need to break the monolithic application into a traditional three-tier application. One of the requirements is that database errors must be displayed in the UI. Which solution will present enough information to the user so they can notify the appropriate person of a problem, but not allow the user to gain information about the design of the database?
A - Add a first chance exception handler and log the information in the error.
Answer : B
Explanation
B.The business layer is the appropriate place to manage data layer excep- tions. By repackaging it and sending it up to the user layer, you can maintain separation of concerns and meet the requirement to display information to the user. This will also enable you to log the information as necessary to support de- bugging.
Q 7 - Using custom error pages provides a lot of flexibility to an application because it allows for a consistent user experience even when the application has a problem. To take full advantage of this flexibility, you need to be able to create the pages and configure the application to use these pages. What code will provide custom error pages for 404 errors and general exceptions?
Answer : B
Explanation
B.This example shows the 404 error status and it sets the default error han- dler to the server error action
Q 8 - What class handles the actual data encryption?
Answer : C
Explanation
C.CryptoStream provides access to an encrypted stream
Q 9 - What roles does a CA play in a PKI? (Choose all that apply.)
A - Serves the certificate for the web server
B - Validates the company or individual purchasing the certificate
C - Signs the certificate as authentic
D - Provides the Domain Name System (DNS) connections between the client and server
Answer : E
Explanation
E.The CA validates the company or individual.The CA signs the certificate
Q 10 - The Controller class is responsible for the following processing stages:
A - Locating the appropriate action method to call and validating that it can be called.
B - Getting the values to use as the action method's arguments.
C - Handling all errors that might occur during the execution of the action method.
Answer : D
Explanation
D.All of the above.
To Continue Learning Please Login
Login with Google