- MVC Framework Tutorial
- MVC Framework - Home
- MVC Framework - Introduction
- MVC Framework - Architecture
- MVC Framework - ASP.NET Forms
- MVC Framework - First Application
- MVC Framework - Folders
- MVC Framework - Models
- MVC Framework - Controllers
- MVC Framework - Views
- MVC Framework - Layouts
- MVC Framework - Routing Engine
- MVC Framework - Action Filters
- Advanced Example
- MVC Framework - Ajax Support
- MVC Framework - Bundling
- Exception Handling
- MVC Framework Useful Resources
- Questions & Answers
- MVC Framework - Quick Guide
- MVC Framework - Resources
- MVC Framework - Discussion
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.
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.)
D - Create an ASP.NET ASMX services file to get, serialize, and return the data.
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.)
B - HTTP polling with 1-minute intervals
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.
Q 3 - What is the best way to intercept every request for an image on your site and ensure that a watermark is added to the image?
A - An HTTP module handling the AuthorizeRequest event
B - A custom HTTP handler set to handle .htm and .html pages
C - A custom HTTP handler configured to serve .png and .jpg files
D - An HTTP module handling the PostRequestHandlerExecute event
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?
B - Content hidden in JavaScript tags
Answer : B
Explanation
B.Additional views must be created or ported to fit the smaller layout.
Q 5 - You are developing an ASP.NET MVC application and you need to create satellite assemblies from resource files. What code should you use?
A - mage.exe /n: /embed:strings.de-DE.resources MyApp.de-DE.resources.dll
B - WinRes.exe /t: embed:strings.de-DE.resources /culture:de-DE
C - Lc.exestrings.de-DE.resourcesMyApp.de-DE.resources.dll
D - al.exe /t:lib /embed:strings.de-DE.resources /culture:de-DE /out:MyApp.de-DE. resources.dll
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.
D - Add two additional servers and create a server farm to serve your content.
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 7 - Using custom error pages provides a lot of flexibility to an application because it allows for a consistent user experience even when the application has a problem. To take full advantage of this flexibility, you need to be able to create the pages and configure the application to use these pages. What code will provide custom error pages for 404 errors and general exceptions?
Answer : B
Explanation
B.This example shows the 404 error status and it sets the default error han- dler to the server error action
Q 8 - WIF adds the concepts of claims to which of the following? (Choose all that apply.)
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,
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?
Answer : B
Explanation
B.Razar syntax starts with @
To Continue Learning Please Login
Login with Google