Friday, September 16, 2011

KB2560890 update without SharePoint SP1

It appears that the Security Update for Microsoft SharePoint Server 2010 (KB2560890) breaks the User Profile Service Application if you don't have SP1 installed for SharePoint 2010. The error I am seeing is:
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.ResourceManagement, Version=4.0.2450.34, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified
According to UserProfile not working after security update KB2560890, it seems like others are having the same issue.

The file list for KB2560890 refers to version 4.0.2450.34 of various Microsoft.resourcemanagement.* files, but does not specifically list Microsoft.ResourceManagement.dll.

In my GAC, I see the following:
Microsoft.ResourceManagement 4.0.2450.5

Microsoft.ResourceManagement.Service 4.0.2450.11

The machine had rebooted from the Windows Update. So, on a whim I decided to try shutting down and restarting the User Profile Service and the User Profile Synchronization Service (remember to iisreset if Central Administration is on the same machine).

I then checked back in my GAC and now I see the following:
Microsoft.ResourceManagement 4.0.2450.5
Microsoft.ResourceManagement 4.0.2450.34
Microsoft.ResourceManagement 4.0.2450.11
Microsoft.ResourceManagement.Service 4.0.2450.34
Microsoft.ResourceManagement.Service 4.0.2450.11

I can also manage my User Profile Service Application!

There's some sort of voodoo here, but as far as I can tell it works. Perhaps there was a continuation task after the Windows Update reboot that required yet another reboot. Who knows?!

Argh! Spoke too soon. If I go to Setup My Sites, I now get the following:
Cannot create an object of type 'Microsoft.SharePoint.Portal.WebControls.LocStringId' from its string representation 'SiteAdminPersonalSite_SocialSecurityTrimmerEnabledSectionTitle_Text' for the 'TitleLocId' property.

Time to give up and just do SP1 sometime in the future.

Thursday, September 15, 2011

SharePoint default members group

I recently had to try to determine the SharePoint Default Members Group of a particular site. In Site Actions->Site Permissions, you can go to a group and then click Make Default Group. What's bizarre is that there is no indication which group is default, at least not in the UI. The only way I could find is in PowerShell as follows:
$web = Get-SPWeb <myurl>
$web.AssociatedMemberGroup

or you can get the ID through the property bag at
$web.Properties["vti_associatemembergroup"]

Not sure which way is better, but either works for me so far. It would also be nice to see it in the UI.

Tuesday, September 13, 2011

Locking down web part zones

One use case in my SharePoint demo environment is to show that certain web part pages have mandatory web parts while others can be customized by the end user. The way to accomplish this is to put the web parts in different zones. Then add the following properties to the <WebPartPages:WebPartZone> element: AllowCustomization="False" AllowPersonalization="False" AllowLayoutChange="False"
Simple! Or you could do this using SharePoint Designer.