Using SPSite and SPWeb objects with RunWithElevatedPrivileges: Don’t cross the borders

This blog post is a contribution from David Wilborn, an engineer with the SharePoint Developer Support team. Although it’s mentioned in the SPSecurity.RunWithElevatedPrivileges documentation, I find that there is still often a lack of clarity for developers when using SPSite and SPWeb objects in conjunction with RunWithElevatedPrivileges delegate. The mistake I see the most often…

6

RunWithElevatedPrivileges does not work with UserProfile API

This blog post is a contribution from Aaron Miao, an engineer with the SharePoint Developer Support team. RunWithElevatedPrivileges executes the specified method with Full Control rights even if the user does not otherwise have Full Control. This is not true for User Profile API. To reproduce, with code below in a web part: SPSecurity.RunWithElevatedPrivileges(delegate() {…

1

HOW TO: Retrieve Web Analytics report data using API

This blog post is a contribution from Aaron Miao, an engineer with the SharePoint Developer Support team. In a scenario that you want to render Web Analytics report data to your favorite format, you need to retrieve the report data. There’s no document on how to retrieve SharePoint built-in report data. Some online articles are…

22

How to use WebAnalytics API – FrontEndDataRetriever.QueryData

This post is a contribution from Jaishree Thiyagarajan, an engineer with the SharePoint Developer Support team. To use WebAnalytics API, first we need to add reference to Microsoft.Office.Server.WebAnalytics.dll and Microsoft.Office.Server.WebAnalytics.UI.dll.  These DLLs can be located in GAC (C:\Windows\Assembly\GAC_MSIL\). The WebAnalytics DB (Report DB) has many Table-Valued-functions, which we can leverage programmatically through FrontEndDataRetriever.QueryData. Check out…

7