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

Answer : E

Explanation

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 designing a work order management application for a mid-size repair company. The application will be used by repair personnel in the field on their laptops with wireless phone connections. The connections are slow, and the laptops are several years out of date. There will never be more than 15 users at any one time, and rarely more than 2 concurrent users. What kind of caching will give the repair personnel a better user experience? (Choose all that apply.)

A - Page output caching

B - Application caching

C - Data caching

D - HTTP caching

E - B and D both

F - All of the above

Answer : E

Explanation

E.Page output caching will cache content at the client side to eliminate some of the required downloads. It is useful in a limited bandwidth environment. It can also be used in donut hole and donut caching scenarios for partial client-side caching.HTTP caching will help response time even though there is not much a developer needs to do to implement the caching.

Answer : F

Explanation

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 creating an ASP.NET MVC web application, and you decide to create a new layout for mobile devices with relatively small screens. Which @media query should you create or modify to accomplish the task? (Choose all that apply.)

A - @media(max-width:768px)

B - @media (max-width:478px) and (orientation:portrait)

C - @media (min-width:768px) and (orientation:portrait)

D - @media(min-width:1200px)

E - A and B both

F - All of the above

Answer : E

Explanation

E.This allows for devices with a maximum width of 768 pixels.This allows for devices with a maximum width of 478 pixels in portrait view, such as tablets.

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

Answer : E

Explanation

E.Bundling every script into a single large file might decrease the effective- ness of concurrent downloading.Not separating scripts logically might lead to the user downloading scripts that will never be used. Although the download experience is maximized, it does not make sense to download unused scripts.

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 - What interfaces or classes should be implemented or inherited when creating custom authentication that is based on a non-Windows, third-party provider? (Choose all that apply.)

A - ActiveDirectoryMembershipProvider

B - IIdentity

C - SqlMembershipProvider

D - Iprincipal

E - B and D both

F - All of the above

Answer : E

Explanation

E.IIdentity describes the user that was authenticated.IPrincipal provides the security context of the user on whose behalf the code is running.

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.

Q 10 - Which Helper Method Returns binary output to write to the response?

A - Content

B - File

C - JavaScript

D - Json

E - C and D both

F - All of the above

Answer : B

Explanation

B.File Helper Method Returns binary output to write to the response


mvc_framework_questions_answers.htm

Advertisements