Monday, August 16, 2010

Configuration to use Content Type in search scope and to display the Content Type in core results web part

1. In Central Admin click on “Manage Service Applications” and select the Search service application
2. Select “Manage” from the ribbon control
Steps 3 and 4 are required if you want to display the content type data in the core results web part
3. Select “Metadata properties” from the left navigation and add a “New managed Property”
4. Give the new property a name, add crawled property mapping to Basic:5(Text) and ows_ContentType(Text), check “Allow this property to be used in scopes” and “Add managed property to custom results set retrieved on each query” check boxes. Click ok when done.

5. Select “Scopes” from the left navigation and select “New scope” to add a new scope for the content type.
Note: If you are using the inbuilt content type managed property then you have to edit the property and check “Allow this property to be used in scopes” check box.
6. After creating the new scope you should add a rule by clicking “New Rule” link.
7. In the new rule screen, check the “Property Query” for the “Scope Rule Type”
8. Select “ContentType” from the “Add Property Restriction” drop down if using the inbuilt Content type managed property if not select the managed property that you added in steps 3 and 4
9. Type in the content type name in the “=” text box below the “Add Property Restriction” drop down

10. Now drop a Core results web part to a page and set the scope to the one created in step 5
11. Add to the “Fetched Properties” under display properties of the core results web part
12. To display the raw XML that is generated, set the XSL editor property of the web part to

Tuesday, August 03, 2010

Issues with starting User Profile Synchronization Service.

Here are some of the issues I faced trying to start the User profile synchronization Service in SharePoint 2010:
1. Exception trying to write the dbName regkey for MIIS System.Security.SecurityException: Requested registry access is not allowed
To solve this error add the farm admin user to the local administrator group on the server on which the service is being started.

2. "The trust relationship between this workstation and the primary domain failed." when trying to start the User profile synchronization service.
The farm admin account needs to be given "Replicating Directory Changes" permission for the domain. Knowledge base 303972 provides the steps needed to grant "Replicating Directory Changes" permission. I am including the steps below from the above knowledge base.

Setting permissions by using the ACL editor

  1. Open the Active Directory Users and Computers snap-in
  2. On the View menu, click Advanced Features.
  3. Right-click the domain object, such as "company.com", and then click Properties.
  4. On the Security tab, if the desired user account is not listed, click Add; if the desired user account is listed, proceed to step 7.
  5. In the Select Users, Computers, or Groups dialog box, select the desired user account, and then click Add.
  6. Click OK to return to the Properties dialog box.
  7. Click the desired user account.
  8. Click to select the Replicating Directory Changes check box from the list.
  9. Click Apply, and then click OK.
  10. Close the snap-in.
Have a look at http://msmvps.com/blogs/shane/archive/2010/07/09/configuring-profile-import-in-sharepoint-2010.aspx, this covers the setup steps in detail.