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.

Questions and Answers

Answer : E

Explanation

E.HttpService.Get gets the output of a REST service.Visual Studio creates a proxy for you from the WSDL at the site you select.

Q 2 - You are creating a solution in which the majority of the application is dynamic, but some areas can be cached for a long time. What kind of approach would you take? (Choose all that apply.)

A - Data caching

B - Donut hole caching

C - Donut caching

D - Windows AppFabric caching

E - B and C both

F - All of the above

Answer : E

Explanation

E.Donut hole caching provides the ability to cache parts of each page.Donut caching is another approach that gives the ability to cache parts of the application.

Answer : C

Explanation

C.You should use general styles as much as possible. Achieving a certain look and feel means that you might have to create some specific styles, however.

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.

Q 5 - You are creating an ASP.NET MVC website and you want to replace a <h2>hello</h2>tag within the view with custom resources you have created. What should you use?

A - <h2>@mvcapp.Resources.Home.Index.Heading</h2>

B - <h2div="resource">Hello</h2>

C - <h2 class="resource">Hello</h2>

D - <h2>@mvcapp.Resources.Home.Index.HeadingHello</h2>

E - C and B both

F - All of the above

Answer : A

Explanation

A.This is the correct way to insert resources into a view

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.

B - Add a generic database-layer exception handler to the business layer, and pass appropriate error information to the UI layer for display in a custom error page.

C - Add specific database exception handlers in the business layer and log the information into the database for further review.

D - Let the errors pass through the business layer to the UI layer where they can be handled as specific errors and presented as appropriate in the UI.

E - A and D both

F - All of the above

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 - You want to configure Windows Azure diagnostics. Where do you configure the specific Performance Monitors you want to have run in support of your application?

A - ServiceDefinition.csdef

B - ServiceConfiguration.cscfg

C - Diagnostics.wadcfg

D - Web.config

E - A and B both

F - All of the above

Answer : C

Explanation

C.You configure specific monitors that will run in your application in the Diagnostics.wadcfg file.

Q 8 - Which methods help the RoleProvider determine whether a user is assigned a role or set of roles? (Choose all that apply.)

A - GetRoles

B - GetRolesForUser

C - IsUserInRole

D - FindUsersInRole

E - B and C both

F - All of the above

Answer : E

Explanation

E.GetRolesForUser gets a list of roles for a user.IsUserInRole returns a Boolean on whether a particular user has a role

Answer : B

Explanation

B.Makes Test Driven Development (TDD) very difficult

Answer : A

Explanation

A.JSON are used to return JSON result in MVC

mvc_framework_questions_answers.htm
Advertisements