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

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 building an application in which you want to display updated information to a website every 15 minutes. What are efficient ways to manage the update? (Choose all that apply.)

A - WebSockets

B - HTTP polling with 1-minute intervals

C - HTTP long polling

D - HTTP polling with 15-minute intervals

E - A and D both

F - All of the above

Answer : E

Explanation

E.WebSockets can be used to pass information between the client and server.HTTP polling with 15-minute intervals is a valid way to get the informa- tion within the required time frame.

Answer : C

Explanation

C.Intercepting every request for .jpg and .png files is the easiest way to consistently add watermarks to the images.

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 : D

Explanation

D.Assembly Linker generates modules or resource files.

Q 6 - Your U.S.-based company recently opened an office in England. Staff members have been making lots of sales calls, which have generated an increase in visits to the company's websites. Much of the activity involves downloading sales sheets, product descriptions, and other sales support information currently stored in PDFs. There have been some performance-related complaints from remote sales staff, but no local users have noticed any problems. Which of the following are potential solutions? (Choose all that apply.)

A - Bundle and minify the PDF files to ensure that there is no wasted space.

B - Write an action result that takes a file name and returns a compressed version of the file for download.

C - Sign on with a CDN with nodes in North America and Europe and use it to serve files and other static content to sales support staff.

D - Add two additional servers and create a server farm to serve your content.

E - B and C both

F - All of the above

Answer : E

Explanation

E.This solution causes more work on the client side to open and view the compressed content, but it provides a more responsive user experience.Moving the part of the site most affected by the new usage closer to the users increases their download speed and thus their perceived performance.

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.

Q 9 - A SQL injection attack occurs when an application allows input submitted by the client to be run as part of a SQL command. What actions should a developer take to ensure that this doesn't happen? (Choose all that apply.)

A - Use Entity SQL because it does not suffer from the same risk.

B - Use SQLParameters to submit the parameters.

C - Use Linq-to-Entities to access the database,

D - Filter out keywords and symbols.

E - B and C both

F - All of the above

Answer : E

Explanation

E.Using SQLParameters is the best way to manage this risk.Linq-to-Entities uses an object model as access into the data layer, so the risk is mitigated.

Q 10 - Which of the following represents razor syntax?

A - !

B - @

C - <%-%>

D - )

E - C and D both

F - All of the above

Answer : B

Explanation

B.Razar syntax starts with @

mvc_framework_questions_answers.htm
Advertisements