Microsoft 70-573 Online Practice
Questions and Exam Preparation
70-573 Exam Details
Exam Code
:70-573
Exam Name
:TS: Office SharePoint Server, Application Development (available in 2010)
Certification
:Microsoft Certifications
Vendor
:Microsoft
Total Questions
:280 Q&As
Last Updated
:Feb 06, 2022
Microsoft 70-573 Online Questions &
Answers
Question 151:
You need to create a Web Part that displays all of the permission levels of the current subsite.
Which collection should you use?
A. SPContext.Current.Web.Properties B. SPContext.Current.Web.Permissions C. SPContext.Current.Web.RoleAssignments D. SPContext.Current.Web.RoleDefinitions
D. SPContext.Current.Web.RoleDefinitions
Explanation: MNEMONIC RULE: "permission levels = RoleDefinitions" The role definition, or permission level, is the list of rights associated with the role. Role Assignments, Role Definitions, and Inheritance http://msdn.microsoft.com/en-us/ library/ms414036.aspx
Question 152:
You have a Feature named Feature1. You plan to create a new version of Feature1 that will upgrade the existing version of Feature1. You need to ensure that when Feature1 is upgraded, additional configuration data is added to the property bag of the site. What should you do?
A. Add a element and increase the Version number of the Feature. B. Add a element and increase the UIVersion number of the Feature. C. Add an element and increase the Version number of the Feature. D. Add an element and increase the UIVersion number of the Feature.
A. Add a element and increase the Version number of the Feature.
MNEMONIC RULE: "CustomUpgradeAction Version"
-- Allows you to execute custom code when a Feature instance is being upgraded.
Creating profile properties and sections the SharePoint 2010 way ?part 2, The code http://pholpar.wordpress.com/2010/03/17/creating-profile-properties-and-sections-the- sharepoint-2010-waypart-2-the-code/
Question 154:
You plan to develop a Web Part that displays a SharePoint list.
The Web Part will verify the list permissions when users access by using the web.CurrentUser.
DoesUserHavePermissions method.
You need to ensure that when users do not have permissions to the list, the Web Part displays the company's logo.
Which code segment should you add to the Web Part?
A. RunWithElevatedPrivileges B. web.AllowUnsafeUpdates= true; C. web.CurrentUser.RequireRequestToken = false; D. web.ValidateFormDigest();
A. RunWithElevatedPrivileges
MNEMONIC RULE: "DoesUserHavePermissions = RunWithElevatedPrivileges" You need to elevate your privileges to check on current user's permissions.
You need to add a new field to a provisioned content type. You must propagate the field to child lists and child content types. What should you use?
C
MNEMONIC RULE: "field for content type = AddContentTypeField" AddContentTypeField Element (Feature) http://msdn.microsoft.com/en-us/library/ff595314.aspx
Question 156:
You create custom code to import content to SharePoint sites.
You create a custom site definition by using Microsoft Visual Studio 2010.
You need to ensure that when a new site that uses the custom site definition is created, the custom code executes after the site is created.
Which class should you add to the project?
A. SPEmailEventReceiver B. SPWebProvisioningProvider C. SPItemEventReceiver D. SPChangeFile
B. SPWebProvisioningProvider
MNEMONIC RULE: "new site created = SPWebProvisioningProvider" Provides a handler for responding to Web site creation. SPWebProvisioningProvider Class http://msdn.microsoft.com/enus/library/microsoft.sharepoint.spwebprovisioningprovider.aspx
Question 157:
You create a Visual Web Part.
You need to add an image to the Web Part. The image must be deployed to the 14\TEMPLATE\IMAGES folder.
What should you do in Microsoft Visual Studio?
A. Add a SharePoint Layouts mapped folder and create a subfolder named Images. B. Create a folder named Images. C. Add a SharePoint Images mapped folder. D. Create a folder named_Layouts and a subfolder named Images.
You need to ensure that users without permissions to the list can view the contents of the list from the Web Part.
Which code segment should you add at line 19?
A. SPSecurity.RunWithElevatedPrivileges(delegate() { using (SPSite eSite = new SPSite(nWeb.ID)) { spToken = nWeb.SystemAccount.UserToken; } } B. SPSecurity.RunWithElevatedPrivileges(delegate() { using (SPSite eSite = new SPSite(nWeb.ID)) { spToken = SPContext.Current.Web.CurrentUser.UserToken; } } C. spToken = nWeb.RootWeb.AllUsers[SPContext.Current.Web.Name].UserToken; D. spToken = nWeb.RootWeb.AllUsers[WindowsIdentity.GetCurrent().Name].UserToken;
A. SPSecurity.RunWithElevatedPrivileges(delegate() { using (SPSite eSite = new SPSite(nWeb.ID)) { spToken = nWeb.SystemAccount.UserToken; } }
Answer A is the only one that will give us a SystemAccount token from within RunWithElevatedPrivilegesstatement.
That's what we are trying to get in case UnauthorizedAccessException occurs.
Question 159:
You need to create a Web Part that adds a term set to the current SharePoint site collection's term store. You write the following code segment. (Line numbers are included for reference only.)
01 System.Web.UI.WebControls.TextBox txtBoxTermSetToAdd = new System.Web.UI.
WebControls.TextBox();
02 TaxonomySession session = new TaxonomySession(SPContext.Current.Site);
A. addedTerm.Export(); B. addedTerm.TermStore.CommitAll(); C. SPContext.Current.Site.WebApplication.Update(); D. SPContext.Current.Web.AllowUnsafeUpdates = true;
B. addedTerm.TermStore.CommitAll();
MNEMONIC RULE: "add a term set = TermStore.CommitAll()" Term Class http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.taxonomy.term.aspx
Question 160:
You need to create a Web Part that verifies whether a user who accesses the Web Part page is a member of a group named Group1.
Which code condition should you use?
A. SPContext.Current.Web.Groups("Group1").ContainsCurrentUser B. SPContext.Current.Web.SiteUsers (SPContext.Current.Web.CurrentUser.ID).Groups ("Group1") null C. SPContext.Current.Web.SiteUsers (SPContext.Current.Web.CurrentUser.ID).Groups ("Group1") = null D. SPContext.Current.Web.Users("Group1").IsDomainGroup
A. SPContext.Current.Web.Groups("Group1").ContainsCurrentUser
MNEMONIC RULE: ContainsCurrentUser Gets a Boolean value that indicates whether the group contains the current user, included either through director indirect membership. SPGroup.ContainsCurrentUser Property http://msdn.microsoft.com/enus/library/microsoft.sharepoint.spgroup.containscurrentuser.aspx
Nowadays, the certification exams become more and more important and required by more and more
enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare
for the exam in a short time with less efforts? How to get a ideal result and how to find the
most reliable resources? Here on Vcedump.com, you will find all the answers.
Vcedump.com provide not only Microsoft exam questions,
answers and explanations but also complete assistance on your exam preparation and certification
application. If you are confused on your 70-573 exam preparations
and Microsoft certification application, do not hesitate to visit our
Vcedump.com to find your solutions here.