Exam1pass
Easiest way to pass IT exams
Exam1pass Help You Pass Any IT Exam
http://www.exam1pass.com
Exam
: Microsoft 70-542
Title
: MS Office SharePoint Server
2007.Application
Development
Version : Demo
Exam1pass
Easiest way to pass IT exams
Exam1pass Help You Pass Any IT Exam
http://www.exam1pass.com
1. You are creating a Microsoft Office SharePoint Server 2007 site.
You create a Microsoft WinForms application to enter information about a user.
You write the following code segment. (Line numbers are included for reference only.)
01 Shared Sub AddUser(ByVal user_name As String())
02
' Using
03
Dim site As SPSite = New SPSite("http://sitename")
04
Try
05
Dim context As ServerContext = _
06
ServerContext.GetContext(site)
07
Dim profileManager As UserProfileManager = New _
08
UserProfileManager(context)
09
...
10
Finally
11
CType(site, IDisposable).Dispose()
12
End Try 13 End Sub
You need to add a user profile to the profile store.
Which code segment should you insert at line 09?
A. Private u As UserProfile = _
profileManager.GetUserProfile(user_name)
...
B. Private profileManager As UserProfileManager = New _
UserProfileManager(context)
Private u As UserProfile = profileManager.GetUserProfile(user_name)
...
u.Commit
C. Private user_name As String = "<UserProfile>"
...
user_name += userProfile + user_name
...
user_name += "</UserProfile>"
profileManager.CreateUserProfile(user_name)
D. Private u As UserProfile = _
profileManager.CreateUserProfile(user_name)
...
u.Commit
Exam1pass
Easiest way to pass IT exams
Exam1pass Help You Pass Any IT Exam
http://www.exam1pass.com
Answer: D
2. You create a Microsoft Office SharePoint Server 2007 application. The application has a user named
UserA.
You need to retrieve a list of colleagues for UserA.
Which code segment should you use?
A. Private Sub RetrieveColleagues(ByVal Cntxtobj As ServerContext)
...
Dim site As SPSite = New SPSite("http: //servername/sites/site1")
Dim profileManager As UserProfileManager = New _
UserProfileManager(Cntxtobj)
Dim profile As UserProfile = _
pro