You need to modify the application to prevent the site from loading slowly
You create a console application to manage Personal Sites. The application contains the following
code segment. (Line numbers are included for reference only.) 01 Dim siteCollection As New
SPSite(“http://moss”); 02 Dim profileManager As New
serProfileManager(ServerContext.GetContext(siteCollection)); 03 Dim profile As UserProfile =
profileManager.GetUserProfile(“domain\username”); 04 Dim personalSite As SPSite =
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?
You need to prevent the error from occurring
You have a SharePoint site collection. The root Web of the site collection has the URL
http://intranet.You plan to create a user solution that will contain a Web Part. The Web Part will
display the title of the root Web. You write the following code segment for the Web Part. (Line
numbers are included for reference only.) 01Dim currentSite As New SPSite(“http://intranet”) 02
03Dim currentTitle As New Label() 04currentTitle.Text = currentSite.RootWeb.Title You add the
Web Part to a page in the root Web and receive the following error message: “Web Part Error:
Unhandled exception was thrown by the sandboxed code wrapper’s Execute method in the partial
trust app domain: An unexpected error has occurred.” You need to prevent the error from
occurring. What should you do?
You need to ensure that when Feature1 is upgraded, additional configuration data is added to the property bag
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?
You need to ensure that when you deploy the Feature, a file named Form1.xsn is deployed to the Feature folder
You are developing a custom Feature by using Microsoft Visual Studio 2010. You need to ensure
that when you deploy the Feature, a file named Form1.xsn is deployed to the Feature folder. You
must achieve this goal by using the minimum amount of development effort. What should you do?
You need to ensure that users can use the Web Part to create new sites
You create a Web Part that takes three values from three text boxes and creates a new
SharePoint site when you click a button named CreateNewSite. The Web Part contains the
following code segment. Protected Sub CreateNewSite_Click(ByVal sender As Object, ByVal e As
EventArgs) Dim site As SPSite = SPContext.Current.Site Dim web As SPWeb =
site.AllWebs.Add(SiteNameTextBox.Text, SiteTitleTextBox.Text, SiteDescriptionTextBox.Text, 0,
SPWebTemplate.WebTemplateSTS, False, _False) End Sub You test the Web Part and it works
properly. When another user attempts to use the Web Part to create a new site, he receives the
following error message: “Error: Access Denied.” You need to ensure that users can use the Web
Part to create new sites. What should you do?
Which code segment should you add to the console application?
You have a custom theme named MyTheme. The theme is defined in a file named
MyTheme.thmx. You have 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
web As SPWeb = site.OpenWeb() 03 … 04 End Using You need to programmatically apply the
theme to a SharePoint site. Which code segment should you add to the console application?
Which control should you include in Form1?
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” ></asp : Button > 03 </form > 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?
You need to hide the Quick Launch navigation bar of a SharePoint site
You create a Feature receiver. You need to hide the Quick Launch navigation bar of a SharePoint
site. What should you use?
You need to prevent users from adding PrivateColumn to the Projects list
You have a SharePoint list named Projects and a site column named PrivateColumn. You need to
prevent users from adding PrivateColumn to the Projects list. Users must be able to add any other
site column to the Projects list. What should you do?
Which attribute should you configure?
You create a custom workflow by using Microsoft Visual Studio 2010. You need to specify a
custom InfoPath workflow initiation form in the workflow element manifest file. Which attribute
should you configure?