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 - .Which of the following are valid reasons for overriding the Run method? (Choose all that apply.)
E.Creating and running an application in parallel is what the Run method was designed to allow.The polling service is a good example of an activity in which the Run.method enables a process to work independently of the main role.Creating and running an application in parallel is what the Run method was designed to allow.
Q 2 - You are adding a reporting vertical to an enterprise application. Many of the reports will be run every morning by a set of users. Some of the reports will be identical as every member of a team will get the same report sometime in the morning. What kind of caching will provide an improvement in performance? (Choose all that apply.)
E.Data caching with the appropriate timeout will enable the data needed for the reports to be stored so that the call to the database is not necessary.A page output caching of four hours caches the output of the report for the whole morning and should eliminate the need for the report to be run a second time.AppFabric caching acts much like data caching to eliminate the need for additional calls to the database to generate the reports.
Q 3 - In which of the following scenarios should you include validation? (Choose all that apply.)
B - The web application you maintain has an area that serves as a pass-through to another company's web services. The form contains personal information, such as address and phone number, and is used to set up a profile on the company's retirement partner website. The partner has never given you any instructions as to what is or is not required to be sent to them.
C - Your application is a long wizard that college students use to apply for financial aid. They do not have access to the application until they are already logged on to the system so the application knows who they are. Most students will log on many times to finish the application, so any field might or might not be completed at any time.
D - You are developing a simple form that helps home brewers keep track of their process. The form provides two input fields: Date/time and ph level. The Date/ time box needs to be an ordinary text box because people around the world might enter the date differently, in a way that is meaningful to them. The ph level can be either a numeric value or a text description.
F.You should build in validation to check that at least one field has been populated before saving an entry.Although the partner company has not provided any requirements, your company is responsible for data entry and therefore should ensure that the data passing through the application meets some minimum criteria.The application has many entry fields so it is difficult to predict when an entry hits a valid stage. However, you already know you have constraints on the data being input because of the size of the database columns in which you will be storing them. A MaxLength validator on each field would help ensure that there is no loss of data.Although either field in the form can be anything, they should have a maximum length limit imposed so the data does not exceed the size of the database column they will be stored in. You should also validate that neither field is empty.
Q 4 - You are modifying an ASP.NET MVC web application and you have created a new master layout page named _Layout.WindowsPhone.cshtml. You want to use that layout in a new view. Which code segment do you use?
B.Layout="" loads the layout file to be used with that view.
Q 5 - You have a set of requirements that expects a particular action to be accessed only through HTTPS by an authenticated user. What is the best way to meet these requirements?
B.It filters out those users not on an SSL connection before performing the more resource-intensive authentication check.
Q 6 - What is an advantage to using first chance exception notification?
C.The first chance exception handler enables you to examine an exception and take some action before it is touched by any other handler
Q 7 - Forms authentication enables you to write code to validate user credentials. After it is complete, you can register the authentication cookies for use throughout the user's visit by using which of the following?
A.FormsAuthentication.SetAuthCookie registers the authentication token in the cookie for use in future requests
Q 8 - Windows Azure ACS allows for federated identification from outside agencies such as a Microsoft account or Facebook. Which entity issues the final token that your application will accept for access?
D.ACS reads the token provided by the identity providers and creates a token that your application understands and accepts.
Q 9 - How do you encrypt the <connectionStrings> section of the Web.config file?
A.This is the proper way to encrypt the <connectionStrings> setting of the Web.config file
Q 10 - The Controller class is responsible for the following processing stages:
D.All of the above.