Microsoft TS: Office SharePoint Server, Application Development (available in 2010) Sample Questions:
1. You create a console application to manage Personal Sites.
The application contains the following code segment. (Line numbers are included for reference only.)
01 SPSite siteCollection = new SPSite("http://moss");
02 UserProfileManager profileManager = new UserProfileManager
(ServerContext.GetContext(siteCollection));
03 UserProfile profile = profileManager.GetUserProfile("domain\\username");
04 SPSite personalSite = profile.PersonalSite;
05
06 siteCollection.Dispose();
You deploy the application to a SharePoint site.
After deploying the application, users report that the site loads slowly. You need to modify the application to prevent the site from loading slowly.
What should you do?
A) Remove line 06.
B) Add the following line of code at line 05:
personalSite.close();
C) Add the following line of code at line 05:
personalSite.Dispose();
D) Change line 06 to the following code segment:
siteCollection.close();
2. You update a solution validator.
You need to ensure that all SharePoint solutions are validated the next time the solutions are executed.
What should you do?
A) Modify the Signature property of the solution validator.
B) Deactivate and activate all of the installed solutions.
C) In the Feature that deploys the solution validator, modify the Version attribute of the Feature element.
D) Modify the Guid attribute of the solution validator.
3. You need to connect two Web Parts by using the IWebPartRow interface. Which method should you use?
A) GetFieldValue
B) DataItem
C) GetTableData
D) GetRowData
4. You create a Feature.
You need to add an item to the context menu of a list.
Which type of element should you use?
A) a ListTemplate
B) a Module
C) a CustomAction
D) a ListInstance
5. You have a SharePoint list named Announcements.
You have an event receiver that contains the following code segment. (Line numbers are included for reference only.)
01 public override void ItemAdding(SPItemEventProperties properties)
02 {
03 if (properties.ListItem["Title"].ToString().Contains("secret"))
04 {
05
06 }
07 }
You need to prevent users from adding items that contain the word "secret" in the title to the list.
Which code segment should you add at line 05?
A) properties.Status = SPEventReceiverStatus.Continue;
B) properties.Cancel = true;
C) return;
D) properties.Cancel = false;
Solutions:
| Question # 1 Answer: C | Question # 2 Answer: A | Question # 3 Answer: D | Question # 4 Answer: C | Question # 5 Answer: B |

We're so confident of our products that we provide no hassle product exchange.


By Giles


