Quicknote: SharePoint "My Links"

I recently was asked to look at an issue where some users were seeing “You are not authorized to view this page” on pages that had webparts that used SharePoint profiles. It turns out that this was because the “Personal Features” permission was turned off in the SSP (this was to disable “My Links” on pages). The resolution steps were as follows

  • Go to SSP
  • Click Personalization services permissions link
  • See if NT Authority\Authenticated Users is added – if not add accordingly and give that group the “Personal Features” permission.
  • (I also need to recycle app pool / iisreset)

(Note that this will reactivate “My Links” – it is probably best to hide this with some css etc).

Asp.Net: Caching Types

Quick clarification.  caching

  • HttpRuntime.Cache = asp.net cache (but can be called statically, and not in the context of the app)
  • HttpContext.Current.Cache = as above, just another layer abstraction (calls httpruntime.cache)
  • Application State – available in application_start in global.asax etc.
  • Normal asp.net cache
  • Also page output caching etc.

http://msdn.microsoft.com/en-us/library/aa478965.aspx
http://weblogs.asp.net/pjohnson/archive/2006/02/06/437559.aspx
http://www.hanselman.com/blog/UsingTheASPNETCacheOutsideOfASPNET.aspx
http://wiki.asp.net/page.aspx/59/application-and-cache/

SharePoint: Setting page title from code

To dynamically set the page title from code, you cannot just directly access this.Page.Header.Title as you would with normal asp.net. This is because in the SharePoint default.master, there is a ContentPlaceHolder control with the id “PlaceHolderPageTitle” that overrides. To overcome this, simply use the following code…

ContentPlaceHolder title = this.Page.Master.FindControl(“PlaceHolderPageTitle”) as ContentPlaceHolder;
title.Controls.Clear();
title.Controls.Add(new LiteralControl(“Your title to go here”));