Consider performance and security for SharePoint WP/App

774 views

Published on

Consider performance and security for SharePoint WP/App, apply to SharePoint 2010, 2013...

Published in: Technology, Business
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
774
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
11
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Consider performance and security for SharePoint WP/App

  1. 1. Take SharePoint® to new heights.Consider performance & Security forSharePoint© 2013 Bamboo Solutions CorporationAll Rights Reserved
  2. 2. Take SharePoint® to new heights.About Author: Nguyen Tuan Hai Team Lead at Bamboo Solutions Blog: http://tuan-tomy.blogspot.com Twitter: @tuantomy Linked: #nsuthaibanhxeo2© 2013 Bamboo Solutions CorporationAll Rights Reserved
  3. 3. Take SharePoint® to new heights.Getting Start3© 2013 Bamboo Solutions CorporationAll Rights ReservedRoll-up data from many sourcesProcess on large number of items
  4. 4. Take SharePoint® to new heights.Contents Define performance and security issue in project Solutions Tools to monitor life-cycle and logging Demo Q&A4© 2013 Bamboo Solutions CorporationAll Rights Reserved
  5. 5. Take SharePoint® to new heights.DefineHeavy load page• Product: web part, applicationpage, custom action…• Configuration: stand-alone, smallfarm, scaled farm, large farm…• Network: LAN, remote…• System: IIS, SQL Server5© 2013 Bamboo Solutions CorporationAll Rights Reserved
  6. 6. Take SharePoint® to new heights.DefineProduct• Bottle-neck (code)• Large list• Dispose• Application pool6© 2013 Bamboo Solutions CorporationAll Rights Reserved
  7. 7. Take SharePoint® to new heights.DefineConfiguration• Best practice installation• Load balancing• Services• Cache: disk-based BLOBcaching, output cache, bit ratethrottling7© 2013 Bamboo Solutions CorporationAll Rights Reserved
  8. 8. Take SharePoint® to new heights.DefineNetwork• Hardware installation• Local Area Network• Distributed database8© 2013 Bamboo Solutions CorporationAll Rights Reserved
  9. 9. Take SharePoint® to new heights.DefineSystem• Recycle application pool• Indexing configuration on database• Double-hop of SQL Server9© 2013 Bamboo Solutions CorporationAll Rights Reserved
  10. 10. Take SharePoint® to new heights.DefineSecurity• Code: Cross-site scripting, querystring, injection, validationpage, permission per user…• Service accounts10© 2013 Bamboo Solutions CorporationAll Rights Reserved
  11. 11. Take SharePoint® to new heights.SolutionsIndicate the number of artifactsScope/narrow down objects11© 2013 Bamboo Solutions CorporationAll Rights ReservedWeb PartsWP PageMedia LibraryPlain ContentRequestServer
  12. 12. Take SharePoint® to new heights.SolutionsWebPart12© 2013 Bamboo Solutions CorporationAll Rights ReservedRequestWeb partBottle-neckServerWeb part ListSPApplicationTimer JobServerRoll-up data
  13. 13. Take SharePoint® to new heights.SolutionsBLOB and Caching13© 2013 Bamboo Solutions CorporationAll Rights Reserved
  14. 14. Take SharePoint® to new heights.SolutionsQuery on large list14© 2013 Bamboo Solutions CorporationAll Rights ReservedSPQuery query = new SPQuery();query.RowLimit = 2000;query.ViewFields = “CAML_Query”;SPListItemCollection collection;do{collection = list.GetItems(query);//Processing dataquery.ListItemCollectionPosition =collection.ListItemCollectionPosition;} while (query.ListItemCollectionPosition != null);
  15. 15. Take SharePoint® to new heights.SolutionsCache SharePoint objectsLoop statement15© 2013 Bamboo Solutions CorporationAll Rights Reserved
  16. 16. Take SharePoint® to new heights.SolutionsBest practice installationManage service accounts16© 2013 Bamboo Solutions CorporationAll Rights Reserved
  17. 17. Take SharePoint® to new heights.SolutionsCheck user permissions appropriately17© 2013 Bamboo Solutions CorporationAll Rights ReservedSPSecurity.RunWithElevatedPrivileges(delegate(){//TODO: Your Code Here});try{list.CheckPermissions(SPBasePermissions.ApproveItems);}catch (UnauthorizedAccessException ex){//Throw exception here}
  18. 18. Take SharePoint® to new heights.Tools18© 2013 Bamboo Solutions CorporationAll Rights Reserved MSOCAF• Test cases
  19. 19. Take SharePoint® to new heights.Tools19© 2013 Bamboo Solutions CorporationAll Rights Reserved MSOCAF• Report resultDownload: https://caf.sharepoint.microsoftonline.com/
  20. 20. Take SharePoint® to new heights.Tools20© 2013 Bamboo Solutions CorporationAll Rights Reserved Developer dashboard• New feature of SharePoint 2010
  21. 21. Take SharePoint® to new heights.Tools21© 2013 Bamboo Solutions CorporationAll Rights Reserved Developer dashboard• Turn on developer dashboard running on demand$service = [Microsoft.SharePoint.Administration.SPWebService]::ContentService$addsetting =$service.DeveloperDashboardSettings$addsetting.DisplayLevel =[Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::OnDemand$addsetting.Update()• Turn on developer dashboard• Turn off developer dashboard$service = [Microsoft.SharePoint.Administration.SPWebService]::ContentService$addsetting =$service.DeveloperDashboardSettings$addsetting.DisplayLevel =[Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::On$addsetting.Update()$service = [Microsoft.SharePoint.Administration.SPWebService]::ContentService$addsetting =$service.DeveloperDashboardSettings$addsetting.DisplayLevel =[Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::Off$addsetting.Update()
  22. 22. Take SharePoint® to new heights.Demo22© 2013 Bamboo Solutions CorporationAll Rights Reserved• Dispose SharePoint Objects• Retrieve data from large list• Use MSOCAF to check the code
  23. 23. Take SharePoint® to new heights.References References:• http://msdn.microsoft.com/en-us/library/gg552614(v=office.14).aspx• http://www.alachisoft.com/storageedge/sharepoint-performance-scalability.html• http://bestofcyber.wordpress.com/2008/10/16/best-coding-techniques-to-improve-performance-for-sharepoint-applications/• http://technet.microsoft.com/en-us/magazine/2009.08.insidesharepoint.aspx• http://blogs.msdn.com/b/sowmyancs/archive/2008/10/26/best-practices-sharepoint-object-model-for-performance-tuning.aspx Thank you!23© 2013 Bamboo Solutions CorporationAll Rights Reserved

×