MVC Framework Online Quiz


Advertisements


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.

Questions and Answers

Q 1 - You are developing an application. One requirement is that part of your data access layer needs to be available to a third party, that wants to get this information from a REST URL in XML. Your company does not have experience with web services, but you have several websites running ASP.NET MVC 4. How could you design and provide these new services? (Choose all that apply.)

A - Task an individual on staff to learn WCF, and have this individual develops and deploys these new services using WCF.

B - Use the Web API to create REST services using ApiController in which the serialization type is defined by the Accepts property of the browser.

C - Build a basic ASP.NET MVC 4 project in which the view simply passes through the information provided by the controller, and the controller manages the code for serializing the response.

D - Create an ASP.NET ASMX services file to get, serialize, and return the data.

E - B,C and D

F - All of the above

Answer : E

Explanation

E.Using ASP.NET MVC is another way to create a controller that will return XML.

Q 2 - You are designing an ASP.NET MVC 4 application that uses an Oracle database for persistence. What session configuration choices enable you to deploy your application on a web farm? (Choose all that apply.)

A - InProc

B - SQLServer

C - StateServer

D - Custom session provider

E - C and D both

F - All of the above

Answer : E

Explanation

E.Using a shared state server across the web farm is an available option. Using a state server designates one server to maintain state for all the servers that connect to it.A custom session provider enables you to maintain state as necessary by doing the work in your custom code. It is generally used when you try to use a dif- ferent RDBMS system or when you do not want to use the default session database design.

Q 3 - You are creating an ASP.NET MVC web application. Within the application, you have created a partial view for contact email and phone number. Which code segment should you use to display the partial view on the main page?

A - @Html.ActionLink("ContactPartial")

B - @Html.Partial("ContactPartial")

C - @RenderPage("ContactPartial")

D - @RenderBody()

E - C and A both

F - All of the above

Answer : B

Explanation

B.@Html.Partial loads a partial view.

Q 4 - You have been asked by the marketing department to help improve your company's ranking in search engine results. They are particularly concerned about a section of the site that is highly interactive, with extensive mouse-over color, background, and text changes. Without looking at the code, what is the most likely reason for ranking low in search engine results?

A - Unclosed HTML tags

B - Content hidden in JavaScript tags

C - Broken links

D - Excessive number of images

E - C and B both

F - All of the above

Answer : B

Explanation

B.Additional views must be created or ported to fit the smaller layout.

Answer : B

Explanation

B.IgnoreRoute is the correct statement to use.

Answer : E

Explanation

E.This solution works because it combines the three discrete values into a single object on the model.Although it takes more work, using an approach of creating a model binder for the entire object, rather than just a part, successfully manages the need to have it in the model and in the database.

Q 8 - WIF adds the concepts of claims to which of the following? (Choose all that apply.)

A - IIdentity

B - IPrincipal

C - User

D - MembershipProvider

E - A and B both

F - All of the above

Answer : E

Explanation

E.The class implementing the IIdentity interface contains claims information. The class implementing the IPrincipal interface contains claims information.

Answer : E

Explanation

E.The AntiXSS Library is more performant than the traditional .NET Framework.AntiXSS takes an accepted-list approach, which means only those characters that have been approved are allowed through.AntiXSS was designed to allow additional support for globalization.

Answer : A

Explanation

A.JSON are used to return JSON result in MVC


mvc_framework_questions_answers.htm

Advertisements