This page was exported from All The Latest MCTS Exam Questions And Answers For Free Share [ https://www.mctsdump.com ] Export date:Sat Apr 20 4:45:57 2024 / +0000 GMT ___________________________________________________ Title: [Pass Ensure VCE Dumps] PassLeader Valid 70-573 Real Exam Questions Guarantee 100 Percent Pass (101-120) --------------------------------------------------- Where Download New Free 70-573 Exam Dumps? As we all konw that new 70-573 exam is difficult to pass, if you cannot get the valid 70-573 exam questions, you will fail the 70-573 exam, but DO NOT WORRY! Nowdays, PassLeader has published the newest 285q 70-573 vce dumps and pdf dumps, in PassLeader's new 285q 70-573 braindumps, you can get all the new questions and answers, it is 100% vaild and will help you achieving 70-573 exam certification quickly. keywords: 70-573 exam,285q 70-573 exam dumps,285q 70-573 exam questions,70-573 pdf dumps,70-573 vce dumps,70-573 study guide,70-573 practice test,TS: Microsoft SharePoint 2010, Application Development Exam QUESTION 101You have a document library named Documents. Minor and major version management is enabled for the document library. You plan to add a document named MyFile.docx to Documents. You create a console application that contains the following code segment. (Line numbers are included for reference only.)01 using (SPSite site = new SPSite("http://intranet"))02 {03 SPList documents = site.RootWeb.Lists["Documents"];04 FileStream fstream = File.OpenRead(@"MyFile.docx");05 byte[] content = new byte[fstream.Length];06 fstream.Read(content, 0, (int)fstream.Length);07 fstream.Close();08 site.RootWeb.Files.Add(documents.RootFolder.Url + "/MyFile.docx", content, true);09 SPFile file = site.RootWeb.GetFile(documents.RootFolder.Url + "/MyFile. docx");10 file.CheckIn(string.Empty);1112 }You need to ensure that all users can see the document. Which code segment should you add at line 11? A.    file.CanOpenFile(true);B.    file.Publish(string.Empty);C.    file.ReleaseLock(string.Empty);D.    file.Update(); Answer: BExplanation:MNEMONIC RULE: "Minor and major versions to Publish" Minor and major version management is enabled for the document library; therefore, we must use Publish()method.SPFile.Publish Methodhttp://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfile.publish.aspx QUESTION 102You create a Microsoft .NET Framework console application that uses a Representational State Transfer (REST) API to query a custom list named Products. The application contains the following code segment.AdventureWorksDataContext codc = new AdventureWorksDataContext(new Uri("http://contoso/_vti_bin/listdata.svc"));codc.Credentials = CredentialCache.DefaultCredentials;You need to read all items in Products into an object. Which method should you use? A.    code.Products.ToListB.    code.Products.AllC.    code.Products.AsQueryableD.    code.Products.ElementAt Answer: AExplanation:MNEMONIC RULE: "read all items ToList"Interacting with SharePoint 2010 lists using REST, ASP.NET and ADO.NET Data Serviceshttp://extendtheenterprise.com/2010/11/03/using-sharepoint-2010-rest-apis-in-asp-net/Enumerable.ToList<TSource> Methodhttp://msdn.microsoft.com/en-us/library/bb342261.aspx QUESTION 103You have a helper method named CreateSiteColumn that contains the following code segment.static void CreateSiteColumn ( SPWeb web, string columnName ){}You need to add a new site column of type Choice to a SharePoint site by using the helper method. Which code segment should you include in the helper method? A.    SPField field = new SPFieldChoice(System.web.Lists[0].Fields, columnName);B.    web.Fields.Add(columnName, SPFieldType.Choice, true);C.    web.Lists[0].Fields.Add(columnName, SPFieldType.Choice, True);D.    web.Lists[0].Views[0].ViewFields.Add(columnName); Answer: BExplanation:MNEMONIC RULE: "web.Fields.Add"SPFieldCollection.Add Method (String, SPFieldType, Boolean)http://msdn.microsoft.com/en-us/library/ms472869.aspx QUESTION 104You have a custom user profile property named MyProperty. You need to create a Web Part that displays the value of MyProperty for the current user. Which code segment should you use? A.    string profile = SPContext.Current.Web.Properties("CurrentUser/MyProperty");B.    string profile = SPContext.Current.Web.Users["MyProperty"].ToString();C.    UserProfileManager profileManager = new UserProfileManager(SPServiceContext.Current);UserProfile userProfile = profileManager.GetUserProfile(SPContext.Current.Web. CurrentUser.LoginName);string profile = userProfile["MyProperty"].ToString();D.    UserProfileManager profileManager = new UserProfileManager(SPServiceContext.Current);UserProfile userProfile = profileManager.GetUserProfile(SPContext.Current.Web.CurrentUser.LoginName);string profile = userProfile.Properties.GetPropertyByName("MyProperty").ToString(); Answer: DExplanation:MNEMONIC RULE: GetPropertyByNameuserProfile.Properties is ProfileSubtypePropertyManager object. See its members in this MSDN article:ProfileSubtypePropertyManager Membershttp://msdn.microsoft.com/en-us/library/microsoft.office.server.userprofiles.profilesubtypepropertymanager_members.aspxSee the sample code at the link below.Creating profile properties and sections the SharePoint 2010 way-part 2, The codehttp://pholpar.wordpress.com/2010/03/17/creating-profile-properties-and-sections-the-sharepoint-2010-waypart-2-the-code/ QUESTION 105You have a SharePoint Web application that has the URL http://intranet. You are creating a Microsoft .NET Framework application that will display the title of the SharePoint site and will execute outside of the SharePoint server. You create a textbox named textBoxTitle. You write the following code segment. (Line numbers are included for reference only.)01 ClientContext context = new ClientContext("http://intranet"); 0203 Web site = context.Web;04 context.Load(site) ;0506 textBoxTitle.Text = site.Title;You discover that line 0 6 generates an error. You need to ensure that the .NET application displays the title of the SharePoint site in textBoxTitle. What should you do? A.    Add the following line of code at line 02.context.ExecuteQuery() ;B.    Add the following line of code at line 05.context.ExecuteQuery();C.    Add the following line of code at line 05.context.ValidateOnClient = true;D.    Add the following line of code at line 02.context-ValidateOnClient = true; Answer: B QUESTION 106You are creating a custom content type named CT1. You need to use a Feature to add an existing site column named SiteCol1 to CT1. Which code segment should you include in the Feature? A.    <Field ID="SiteCol1"/>B.    <Field ID="{XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX}" Name="SiteCol1"/>C.    <FieldRef ID="SiteCol1" Name="{XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX}"/>D.    <FieldRef ID="{XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX}" Name="SiteCol1"/> Answer: DExplanation:MNEMONIC RULE: "existing Field needs to be Referenced" FieldRef Element (ContentType)http://msdn.microsoft.com/en-us/library/aa543225.aspx QUESTION 107You create a Web Part. You need to display the number of visits to a SharePoint site collection in a label named LblVisits. You write the following code segment. (Line numbers are included for reference only.)01 SPSecurity.RuntfithElevatedPrivileges (delegate()02 {03 try04 {0506 LblVisits.Text = site.Usage.Visits.ToString () ;07 }08 finally09 {1011 }12 }13 );Which code segment should you add at line 05? A.    SPSite site - SPContext.GetContext (HttpContext.Current ).Site;B.    SPSite site = new SPSite (SPContext.Current.Site.ID );C.    SPSite site = SPContext.Current.Site;D.    SPSite site - SPControl.GetContextSite (HttpContext.Current ); Answer: B QUESTION 108You plan to create a custom Web Part that displays items from a custom SharePoint list named Project. You need to ensure that you can access the list by using strongly-typed objects in Microsoft Visual Studio 2010. What should you do first? A.    Edit the web.config file.B.    Run spmetal.exe.C.    Run ecmangen.exe.D.    Edit the Manifest.xml file. Answer: BExplanation:MNEMONIC RULE: "strongly-typed = spmetal.exe"The LINQ to SharePoint provider is a new feature in SharePoint 2010 that allows you to use a strongly-typedentity model and the language integrated query (LINQ) query syntax to query list data. Essentially, LINQ toSharePoint hides the complexity of developing CAML queries from developers, which can reduce developmenttime and make code more readable. The LINQ to SharePoint provider converts the LINQ expressions into CAML queries at run time. Although you can manually develop your entity classes, in most cases, you will want to use the SPMetalcommand line tool.Using LINQ to SharePointhttp://msdn.microsoft.com/en-us/library/ff798478.aspx QUESTION 109You need to create a Web Part that displays all of the content created by a specific user. You write the following code segment. (Line numbers are included for reference only.)01 Dim kRequest As New KeywordQuery(ServerContext.Current) 0203 kRequest.QueryText = strQuery04 Dim resultTbls As ResultTableCollection = kRequest.Execute()Which code segment should you add at line 02? A.    Dim strQuery As String = "author:" & searchAuthorB.    Dim strQuery As String = "docID:" & searchAuthorC.    Dim strQuery As String = "SELECT Title, Rank, Write, Url FROM SCOPE() WHERE author = " & searchAuthorD.    Dim strQuery As String = "SELECT Title, Rank, Write, Url FROM SCOPE() WHERE docID = " & searchAuthor Answer: A QUESTION 110You create two custom lists named Offices and Rooms.Rooms has the following columns:Offices thas the following columns:You need to perform a Representational State Transfer (REST) query that returns a list of all the offices that have rooms with a capacity of 10. The query results must include the room titles and the equipment in each room. Which URL should you choose? A.    /_vti_bin/ListData.svc/Offices $expand=Rooms&$filter=Rooms/Capacity eq 10B.    /_vti_bin/ListData.svc/Offices &$filter=Rooms/Capacity eq 10C.    /_vti_bin/ListData.svc/Rooms $expand=Offices&$filter=Rooms/Capacity eq 10D.    /_vti_bin/ListData.svc/Rooms &$filter=Offices/Capacity eq 10 Answer: AExplanation:MNEMONIC RULE: "Offices-Rooms-Rooms/Capacity" You can use the Expand method to navigate from one entity to a related entity. You can append query strings to the URLs in order to specify filter criteria or query logic.Using the REST Interfacehttp://msdn.microsoft.com/en-us/library/ff798339.aspx http://www.passleader.com/70-573.html QUESTION 111You create a Web Part that programmatically updates the description of the current SharePoint site. The Web Part contains the following code segment. (Line numbers are included for reference only.)01 RunWithElevatedPrivileges(EvelateSub)02 Private Sub ElevatedSub()03 Dim currSite As SPSite = SPContext.Current.Site04 Dim currWeb As SPWeb = SPContext.Current.Web05 Using eSite As New SPSite(currSite.ID)06 Using eWeb As SPWeb = eSite.OpenWeb(currWeb.ID)07 eWeb.AllowUnsafeUpdates = True08 currWeb.Description = "Test"09 currWeb.Update()10 eWeb.AllowUnsafeUpdates = False11 End Using12 End UsingUsers report that they receive an Access Denied error message when they use the Web Part. You need to ensure that all users can use the Web Part to update the description of the current site. What should you do? A.    Remove lines 07 and 10.B.    Remove lines 08 and 09.C.    Change lines 08 and 09 to use the eWeb variable.D.    Change lines 07 and 10 to use the currWeb variable. Answer: C QUESTION 112You create a Web Part that queries a list. The Web Part contains the following code segment. (Line numbers are included for reference only.)01 Protected Overloads Overrides Sub Render(ByVal writer As HtmlTextWriter)02 Dim spInToken As SPUserToken = GetTheContext(SPContext.Current.Site)03 Using aSite As New SPSite(curSiteCtx.ID, spInToken)04 ...05 End Using06 End Sub07 Private Function GetTheContext(ByVal nWeb As SPSite) As SPUserToken08 nWeb.CatchAccessDeniedException = False09 Dim spToken As SPUserToken = Nothing10 Try11 spToken = nWeb.SystemAccount.UserToken12 Catch generatedExceptionName As UnauthorizedAccessException 1314 End Try15 Return spToken16 End FunctionYou 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 13? A.    SPSecurity.RunWithElevatedPrivileges(EvelvatedSub) Private Sub ElevatedSub()Using eSite As New SPSite(nWeb.ID)spToken = nWeb.SystemAccount.UserTokenEnd UsingEnd SubB.    SPSecurity.RunWithElevatedPrivileges(EvelvatedSub) Private Sub ElevatedSub()Using eSite As New SPSite(nWeb.ID)spToken = SPContext.Current.Web.CurrentUser.UserToken End UsingEnd SubC.    spToken = nWeb.RootWeb.AllUsers(SPContext.Current.Web.Name).UserTokenD.    spToken = nWeb.RootWeb.AllUsers(SPContext.Current.Web.Name).UserToken Answer: A QUESTION 113You need to create a custom content type and specify the content type ID. What should you do? A.    Create a new module.B.    Create a custom Feature.C.    Call the Lists Web service.D.    Call the Webs Web service. Answer: BExplanation:MNEMONIC RULE: "custom Feature for custom content type" Create Custom Content Types in SharePoint 2010http://msdn.microsoft.com/en-us/library/ff630942.aspx QUESTION 114You need to delete the previous versions of all documents in a document library. The deleted versions of the documents must be retained in the SharePoint Recycle Bin. What should you do? A.    For the document library, call the Recycle method.B.    For the document library, call the Delete method.C.    For each document, call the DeleteAll method of the Versions property.D.    For each document, call the RecycleAll method of the Versions property. Answer: DExplanation:MNEMONIC RULE: "all previous versions to Recycle Bin = RecycleAll of the Versions" Recycles the version collection except for the current version.SPListItemVersionCollection.RecycleAll Methodhttp://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splistitemversioncollection.recycleall.aspx QUESTION 115You have a SharePoint solution that contains a custom site column and a custom content type. You need to add the custom site column as a lookup field for the custom content type. What should you create? A.    a Feature activation dependencyB.    a new Feature event receiverC.    a new moduleD.    a new SharePoint mapped folder Answer: BExplanation:MNEMONIC RULE: "Feature event receiver"Walkthrough: Add Feature Event Receivershttp://msdn.microsoft.com/en-us/library/ee231604.aspx QUESTION 116You have a SharePoint site collection that has the URL http://contoso/sites/finance. You are creating a Microsoft .NET Framework console application that will use the SharePoint client object model to create a site in the site collection. The application contains the following code segment. (Line numbers are included for reference only.)01 Dim cCtx As New ClientContext("http://contoso/sites/finance")02 Dim root As Web = cCtx.Site.RootWeb03 cCtx.Load(root)04 Dim webInfo As New WebCreationInformation()05 webInfo.Title = "site1"06 webInfo.Url = "site1"07 webInfo.WebTemplate = "MPS#2"08 root.Webs.Add(webInfo)0910 cCtx.Dispose()You need to ensure that the application creates the site. Which code segment should you add at line 09? A.    cCtx.ExecuteQuery()B.    cCtx.Site.RootWeb.Update()C.    root.Context.Dispose()D.    root.Update() Answer: A QUESTION 117You 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 Dim txtBoxTermSetToAdd As New System.Web.UI.WebControls.TextBox()02 Dim session As New TaxonomySession(SPContext.Current.Site)03 Dim addedTerm As TermSet = session.TermStores(0).Groups("MyNewTermStore").CreateTermSet(txtBoxTermSetToAdd.Text)04Which code segment should you add at line 04? A.    addedTerm.Export()B.    addedTerm.TermStore.CommitAll()C.    SPContext.Current.Site.WebApplication.Update()D.    SPContext.Current.Web.AllowUnsafeUpdates = True Answer: B QUESTION 118You have a SharePoint site collection that contains 100 sites. Each site contains 100 lists. You need to retrieve all item titles from all lists. The data must be retrieved in the minimum amount of time. Which access method should you use? A.    SPList.ItemsB.    SPListltemCollection.GetDataTableC.    SPSiteDataQueryD.    ListData.svc Answer: CExplanation:MNEMONIC RULE: "100 sites = SPSite"The data must be retrieved in the minimum amount of time; therefore, SPSiteDataQuery SPSiteDataQuery Classhttp://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spsitedataquery.aspx QUESTION 119You have a SharePoint site. The current master page of the site is v4.master. You create a custom master page named MyMasterPage.master and deploy it to /_catalogs/masterpage/. You need to apply the custom master page to the site and ensure that future pages added to the site, including system and application pages, automatically use the custom master page. You must also ensure that future SharePoint updates do not remove or modify the changes you have made. What should you do? A.    Set the MasterUrl property and CustomMasterUrl property of the site to /_catalogs/masterpage/MyMasterPage.master.B.    In the Cpage directive of each page layout, set the MasterPageFile attribute to /_catalogs/masterpage/MyMasterPage.master.C.    Rename the custom master page as v4.master and overwrite 14TEMPLATEGL0BALv4.master.D.    Rename the custom master page as v4.master and overwrite /_catalogs/masterpage/v4,master. Answer: A QUESTION 120You plan to develop a Web Part that displays a SharePoint list. The Web Part will verify the list permissions when users access it 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.ValldateFormDigest();C.    web.CurrentUser.RequireRequestToken = false;D.    web.AllowUnsafeUpdates= true; Answer: AExplanation:MNEMONIC RULE: "DoesUserHavePermissions = RunWithElevatedPrivileges" You need to elevate your privileges to check on current user's permissions.DoesUserHavePermissions?http://www.shannonbray.com/2010/01/doesuserhavepermissions.html http://www.passleader.com/70-573.html --------------------------------------------------- Images: --------------------------------------------------- --------------------------------------------------- Post date: 2015-11-16 04:11:43 Post date GMT: 2015-11-16 04:11:43 Post modified date: 2015-11-16 04:11:43 Post modified date GMT: 2015-11-16 04:11:43 ____________________________________________________________________________________________ Export of Post and Page as text file has been powered by [ Universal Post Manager ] plugin from www.gconverters.com