My blog has moved!

My blog has moved to http://www.lamber.info. Click on the redirect button below to be redirected to the blog post.

Please update your bookmarks and use the new url for getting new updates.

Pages

Tuesday, May 31, 2011

SharePoint 2010 and Project Server 2010 service pack 1 announced

Microsoft announced the planned release date of Service Pack 1 for SharePoint 2010, Project Server 2010, and the Office 2010 Suite for end of June on this blog post. They are providing us not only a collection of the hotfixes and cumulative updates recently published for these products, but also some interesting enhancements for the server platforms and client applications.

I’m happy to hear that the team of Project Server 2010 was able to provide a first cross-browser support for the Project Server 2010 Web App. This is certainly one of the most important improvements for this platform and opens Project Server 2010 to companies that have heterogeneous environments. Furthermore, Project Professional 2010 will be able to synchronize scheduled tasks with SharePoint 2010 task lists. This is a great thing and gives our customers the possibility to do small project management with Microsoft tools without requiring an immediate introduction of the Project Server 2010 platform.

Finally, I update my SharePoint 2010 and Project Server 2010 update blog post to keep track of all the cumulative updates (and in future also service packs 1) of these products. (it is a little bit late to be a news, but next time I try to be more proactive Smile)

 

Stay tuned,

Patrick

Saturday, May 21, 2011

SharePoint 2010: Update user accounts after domain rename

one of my customers did a domain renaming lately in his network. Unfortunately, he forgot to consider his SharePoint environment and was wondering why the bad SharePoint system is not working after this “small” environmental change. Unfortunately, he also forgot to mention this important structural change to me before Smile(but this is another story).

“The roof… the roof. The roof is on fire” is a part of a famous song of the band the Bloodhound Gang. This probably describes exactly how the whole situation was looking like.

Fortunately, it took me not all too much to make SharePoint running again. The first step was to update the SharePoint service accounts and to do a system reboot. After this, the central administration was working again. So far… so good.

Nevertheless, there was still an additional problem. I managed to access the central administration, however, the users did not manage to login into their TeamSites. After checking the TeamSite I discovered that the permission assignments of these users still showed the old account name references (with old domain). Therefore, it was necessary to update them to reference to the new domain. I found two solutions to do this:

Solution 1: Manual work

  • Update the site collection admin in central administration for the site
  • Login with this account on the TeamSite
  • Assign again the permissions to each single user. This changes automatically the account references with the new domain name

Solution 2: Powershell

After the change of two users I was already worried about the time it might take to update all references. Therefore, I wrote a simple Powershell script that does the job for me. The idea is pretty simple. Let us use the “EnsureUser” method of the web (find here more info about this method) on each single user entry. This makes the same changes and updates the account references for us.

Please note that I executed this script only one one single site collection. You can change it to many site collections without any problems.

Add-PSSnapin Microsoft.SharePoint.Powershell

$rootWeb = Get-SPWeb "yoursite"
$oldDomain = "yourOldDomain"
$newDomain = "yourNewDomain"

#loop through all users in the $rootWeb, change the login name and execute the EnsureUser method
foreach ($user in $rootWeb.Users) {
$newLogin = $user.UserLogin -replace $oldDomain, $newDomain

$rootWeb.EnsureUser($newLogin)
}

As usual, before executing such scripts, ensure that you backed up your system before.


It could be that there is a more elegant solution out there that does this job faster, however, in this special case this was my rescue.


 


Hope this helps,


Patrick

User Profile Services: “An Unexpected Error has occurred” when accessing the User Profile Service configuration pages the first time

Getting an Unexpected Error has occurred immediately after you created successfully a User Profile Service (not with the Wizard) is not exactly the welcome message you might expect to get.

Profile

The SharePoint logs might return an exception that looks as follows:

04/26/2011 12:51:21.30     w3wp.exe (0x080C)                           0x1A7C    SharePoint Portal Server          User Profiles                     et8j    High        UserProfileServiceUserStatisticsWebPart:LoadControl failed, Exception: System.IO.FileLoadException: The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)     at Microsoft.Office.Server.UserProfiles.UserProfileConfigManager.InitializeIlmClient(String ILMMachineName, Int32 FIMWebClientTimeOut)     at Microsoft.Office.Server.UserProfiles.UserProfileConfigManager..ctor(UserProfileApplicationProxy userProfileApplicationProxy, Guid partitionID)     at Microsoft.SharePoint.Portal.WebControls.UserProfileServiceStatisticsWebPartBase.LoadControl(Object sender, EventArgs e)    74f2b279-c038-4048-8853-b212031feb24
04/26/2011 12:51:21.31     w3wp.exe (0x080C)                           0x1A7C    SharePoint Portal Server          User Profiles                     et8j    High        UserProfileServiceAudienceStatisticsWebPart:LoadControl failed, Exception: System.IO.FileLoadException: The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)     at Microsoft.Office.Server.UserProfiles.UserProfileConfigManager.InitializeIlmClient(String ILMMachineName, Int32 FIMWebClientTimeOut)     at Microsoft.Office.Server.UserProfiles.UserProfileConfigManager..ctor(UserProfileApplicationProxy userProfileApplicationProxy, Guid partitionID)     at Microsoft.SharePoint.Portal.WebControls.UserProfileServiceStatisticsWebPartBase.LoadControl(Object sender, EventArgs e)    74f2b279-c038-4048-8853-b212031feb24
04/26/2011 12:51:21.33     w3wp.exe (0x080C)                           0x1A7C    SharePoint Portal Server          User Profiles                     et8j    High        UserProfileServiceImportStatisticsWebPart:LoadControl failed, Exception: System.IO.FileLoadException: The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)     at Microsoft.Office.Server.UserProfiles.UserProfileConfigManager.InitializeIlmClient(String ILMMachineName, Int32 FIMWebClientTimeOut)     at Microsoft.Office.Server.UserProfiles.UserProfileConfigManager..ctor(UserProfileApplicationProxy userProfileApplicationProxy, Guid partitionID)     at Microsoft.SharePoint.Portal.WebControls.UserProfileServiceStatisticsWebPartBase.LoadControl(Object sender, EventArgs e)    74f2b279-c038-4048-8853-b212031feb24

Some file not founds and assemblies that do not match the assembly reference.

At the end, I was again too fast in setting up the service application without finishing to read the excellent TechNet article. I missed one but important step:

Reset IIS

If the Central Administration Web site and the User Profile Synchronization service are running on the same server, you must reset IIS after the User Profile Synchronization service starts. If they are running on different servers, you may skip this procedure.

If you get a similar exception when setting up the profile service application, do not forget to do an IISReset. Please also wait a little bit until the service is ready. Then you are able to continue.

 

Hope this helps,
Patrick

Saturday, May 14, 2011

People Picker in Central Administration: “Claims Mode call failed. Error Message: Object reference not set to an instance of an object.”

Today, I was playing around with the User Profile Service Application. I was trying out the Organization Subtypes and wanted to add an AD user by using a SharePoint people picker control. However, the people picker returned the error:

An error has occurred in the claim providers configured form this site collection

01Error

First thing I did is to check the logs which returned two error messages:

05/14/2011 15:21:34.10     w3wp.exe (0x22A8)                           0x13A0    SharePoint Foundation             Claims Authentication             8307    Critical    An exception occurred in AllUsers claim provider when calling SPClaimProvider.FillHierarchy(): Object reference not set to an instance of an object..    300fe487-7f75-4244-8a29-bb1fbf7e0850

and…

05/14/2011 15:21:34.11     w3wp.exe (0x22A8)                           0x13A0    SharePoint Foundation             Web Controls                      ad60    Medium      Claims Mode call failed. Error Message: Object reference not set to an instance of an object.  Callstack:    at Microsoft.SharePoint.Administration.Claims.SPAllUserClaimProvider.GetAllPossiblePickerEntities(Uri context, Boolean unrestricted)     at Microsoft.SharePoint.Administration.Claims.SPAllUserClaimProvider.FillHierarchy(Uri context, String[] entityTypes, String hierarchyNodeID, Int32 numberOfLevels, SPProviderHierarchyTree hierarchy)     at Microsoft.SharePoint.Administration.Claims.SPClaimProvider.GetHierarchy(Uri context, String[] entityTypes, String hierarchyNodeID, Int32 numberOfLevels)     at Microsoft.SharePoint.Administration.Claims.SPClaimProviderOperations.GetHierarchy(Uri context, SPClaimProviderOperationOptions mode, String[] providerNames, String[] entityTypes, Int32 num...    300fe487-7f75-4244-8a29-bb1fbf7e0850

Object reference not set to an instance of an object sounds never good. Fortunately, the solution to this problem was not far away. I only needed to look some log entries before the exception to see the real root cause:

Alternate access mappings have not been configured.  Users or services are accessing the site http://lrd01demo:21000 with the URL http://central.demo.info.  This may cause incorrect links to be stored or returned to users.  If this is expected, add the URL http://central.demo.info as an AAM response URL.  For more information, see: http://go.microsoft.com/fwlink/?LinkId=114854"/>    300fe487-7f75-4244-8a29-bb1fbf7e0850

The alternate access mappings misconfiguration strikes back again! I accessed the central administration by using the DNS entry central.demo.info. However, I forgot to add it as entry for the central administration.

The exception disappeared immediately after I assigned the correct alternate access mappings entry to my central administration.

 

Hope this helps,
Patrick

Monday, May 2, 2011

How to remove the “Additional resources” text in the SharePoint 2010 search results

if you search in SharePoint 2010 without success, then you are receiving a “not found” description with suggestions and additional resources. This is a simple text that explains what to do to get any results from the search. The text might look like that:

SearchPart

This text works fine for most cases. However, I got recently a request from a customer to remove the Additional resources text from the search results. This request came due to some misleading suggestions that were not exactly correct for the context of my customer.

There are not options that allow you to change this text. Fortunately, the Search Core Result Web Part responsible to render the search results on the page can be customized in a very flexible way. This Web Part uses a XSLT to transform the results and render them. If you want to remove the text above from the search results, then you have to do some changes on the XSLT of the Web Part.

Follow these steps:

  • Edit WebPart for the Core Search Result WebPart of this page
  • locate the XSLT Editor… button (see next figure)

searchPart2

  • a new window opens. Locate the text in the XSLT that follows
<h3>
<xsl:value-of select="$AdditionalResources" />
</h3>
<ul>
<li><xsl:value-of select="$AdditionalResources1" /><xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
<xsl:choose>
<xsl:when test="string-length($IsSearchServer) &gt; 0">
<a href="javascript:HelpWindowKey('MSSEndUser_FindContent')" label="$SearchHelp"><xsl:value-of select="$SearchHelp" /></a>
</xsl:when>
<xsl:otherwise>
<a href="javascript:HelpWindowKey('WSSEndUser_FindContent')" label="$SearchHelp"><xsl:value-of select="$SearchHelp" /></a>
</xsl:otherwise>
</xsl:choose>
</li>
<li><xsl:value-of select="$AdditionalResources2" /></li>
</ul>


  • Remove completely this code snippet if you don’t want to display the results
  • Confirm the changes

After these changes the results of the Core Search Result Web Part should not display the Additional Resources section anymore.


 


Hope this helps,


Patrick