MCTS SharePoint 2010 Application Development 2 — Questions and Answers
Question 1: Which SharePoint 2010 feature allows you to create reusable, parameterized content that can be inserted into pages?
- Content Types
- Web Parts (Correct answer)
- Page Layouts
- Content Query Web Part
Correct answer: Web Parts
Web Parts are reusable components that can be added to SharePoint pages and configured with parameters.
Question 2: In SharePoint 2010, what is the purpose of the SPSite class?
- Represents a single SharePoint list
- Represents a site collection (Correct answer)
- Represents a single web application
- Represents a SharePoint farm
Correct answer: Represents a site collection
SPSite represents a site collection, which is the top-level container for a group of SharePoint sites.
Question 3: Which method is used to deploy a SharePoint 2010 solution package (.wsp) to a farm?
- Install-SPSolution (Correct answer)
- Add-SPSolution
- Deploy-SPSolution
- New-SPSolution
Correct answer: Install-SPSolution
Install-SPSolution is the PowerShell cmdlet used to deploy a solution package to a SharePoint farm.
Question 4: What SharePoint 2010 mechanism allows you to respond to events such as item additions or deletions in a list?
- Workflows
- Timer Jobs
- Event Receivers (Correct answer)
- Feature Receivers
Correct answer: Event Receivers
Event Receivers allow developers to handle synchronous and asynchronous events on SharePoint objects like lists and libraries.
Question 5: In a SharePoint 2010 sandbox solution, which resource is NOT available?
- SPWeb
- SPList
- SPSecurity
- Full-trust assemblies (Correct answer)
Correct answer: Full-trust assemblies
Sandbox solutions run in a restricted environment and cannot use full-trust assemblies or access farm-level resources.
Question 6: Which SharePoint 2010 service application provides search functionality across enterprise content?
- Business Data Connectivity Service
- Managed Metadata Service
- Search Service Application (Correct answer)
- User Profile Service
Correct answer: Search Service Application
The Search Service Application indexes and queries content across SharePoint and connected external data sources.
Question 7: What is the correct way to dispose of an SPWeb object obtained via SPSite.OpenWeb() in SharePoint 2010?
- Call SPWeb.Close()
- Use a using statement or call SPWeb.Dispose() (Correct answer)
- Set the variable to null
- Call SPSite.Close()
Correct answer: Use a using statement or call SPWeb.Dispose()
SPWeb implements IDisposable, so it must be disposed via a using block or explicit Dispose() call to prevent memory leaks.
Which SharePoint 2010 feature allows you to create reusable, parameterized content that can be inserted into pages?