You have a SharePoint farm that has more than 100 custom Features. You upgrade several Features in the farm. You need to ensure that the site collection uses the most up- to-date versions of the Features. Only Features that require an
upgrade must be evaluated.
Which code segment should you use?
A. Dim webServices As New SPWebServiceCollection(SPFarm.Local) For Each myWebService1 As SPWebService In webServices Dim queryResults As SPFeatureQueryResultCollection = myWebService1.QueryFeatures (SPFeatureScope.Site, True) Dim featureEnumerator As IEnumerator(Of SPFeature) = queryResults.GetEnumerator() While featureEnumerator.MoveNext() Dim feature As SPFeature = featureEnumerator.Current feature.Upgrade(False) End While NextYou create a SharePoint solution. You deploy the SharePoint solution by using Microsoft Visual Studio 2010. You need to prevent the Feature that is contained in the solution from being automatically activated when you deploy the solution. What should you configure in Visual Studio 2010?
A. the active deployment configurationYou 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 Web application 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.)
01Dim context As New ClientContext("http://intranet") 03Dim site As Web = context.Web
04context.Load(site) 06textBoxTitle.Text = site.Title
You discover that line 04 generates an error. You need to ensure that the .NET application displays the title of the SharePoint Web application in textBoxTitle. What should you do?
A. Add the following line of code at line 02. context.ExecuteQuery()You 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 site As New SPSite("http://intranet")
02 Dim documents As SPList = site.RootWeb.Lists("Documents")
03 Dim fstream As FileStream = File.OpenRead("MyFile.docx")
04 Dim content As Byte() = New Byte(fstream.Length - 1) {}
05 fstream.Read(content, 0, CInt(fstream.Length))
06 fstream.Close()
07 site.RootWeb.Files.Add(documents.RootFolder.Url and "/MyFile.docx", content, True)
08 Dim file As SPFile = site.RootWeb.GetFile(documents.RootFolder.Url and "/ MyFile.docx")
09 file.CheckIn(String.Empty)
11 End Using
You need to ensure that all users can see the document. Which code segment should you add at line 10?
A. file.CanOpenFile(true)You need to create a custom application that provides users with the ability to create a managed property. The managed property name must be specified in the args [1] parameter.
You write the following code segment for the application.
01 SPSite currentSite = new SPSite("http://intranet");
02 SearchContext context = SearchContext.GetContext(currentSite);
03 Schema schema = new Schema(context);
Which code segment should you add to the application?
A. context.SearchApplication.CrawlStores.Create(args[1]);You created a custom ASPX page that updates a list. The page is deployed to the Jayouts folder. The page contains the following code segment.
01 < form id=" Forml" runat =" Server" >
02 < asp: Button id=" btnUpdate " runat =" server" Text=" Update" >
03
A user attempts to update the list by using the page and receives the following error message: "The security validation for this page is invalid".
You need to prevent the error from occurring.
Which control should you include in Form1?
A. inputFormCustomValidatorYou create a custom site definition.
You need to modify the contents of the Quick Launch area.
Which file should you modify?
A. Schema.xmlYou 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 SPSecurity.RunUithElevatedPrivileges (delegate()
02 {
03 SPSite currSite = SPConcext.Current.Site ;
04 SPUeb currUeb = SPContext.Current.Ueb ;
05 using (SPSite eSite = new SPSite ( currSite.ID ) )
06 {
07 using (SPWeb eWeb = eSite.OpenUeb ( currUeb.ID ) )
08 {
09 Web.AllowUnsafeUpdates = true;
10 currUeb.Description = "Test";
11 currUeb.Update ();
12 eUeb.AllowUnsafeUpdates = false;
13 }
14 }
15 }
16 };
Users 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 10 and 11.You need to create a Microsoft .NET Framework console application that queries a list by using the SharePoint client object model. Which two assemblies should you reference? (Each correct answer presents part of the solution. Choose two.)
A. Microsoft.Office.Sharepoint.ClientExtensions.dllYou plan to create a custom approval workflow. The workflow approvers will enter their employee number in the edit task form. You need to ensure that the onTaskChangedl_Invoked method of the workflow retrieves the value of the employee number.
Which object should you use?
A. SPWorkflowTaskProperties.ExtendedPropertiesNowadays, 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.