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 SPSite siceCollection = new
SPSite (“http://rcoss”); 02 UserProfileManager profileManager = new UserProfileManager (
Server-Context.GetContext (siteCollection)) ; 03 UserProf ile profile = prof ileManager. GetUser
Prof ile (“domainWusername”) ; 04 SPSite personalSite = 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 create a console application to manage Personal Sites. The application contains the following
code segment. (Line numbers are included for reference only.) 01 SPSite siceCollection = new
SPSite (“http://rcoss”); 02 UserProfileManager profileManager = new UserProfileManager (
Server-Context.GetContext (siteCollection)) ; 03 UserProf ile profile = prof ileManager. GetUser
Prof ile (“domainWusername”) ; 04 SPSite personalSite = 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?

A.
Change line 06 to the following code segment. siteCollection. Close ();

B.
Add the following line of code at line 05. pecsonalSite. Close ();

C.
Add the following line of code at line OS. personolSite.Dispose ();

D.
Remove line 06.



Leave a Reply 0

Your email address will not be published. Required fields are marked *