Friday, August 20, 2010

Sharepoint 2010 User Profile Service Application

 

During Installation of Sharepoint 2010 I encountered an issue when I was creating a connection from Central Administration > Manage Profile Service > User Profile Service Application.

image

I received the error message below:

”Cannot navigate to the requested page because User Profile Synchronization service is not running. Please start the User Profile Synchronization service before creating a connection.”

Solution

  • Check that the status of User Profile Service and User Profile Synchronization Service is started. To start the service navigate to Central Administration > System Settings > Manage services on server.

    image
  • Check running job status “ProfileSynchronizationSetupJob” from Central Administration > Monitoring. Wait for the job to finish. Once the job successfully executed you can proceed to add a new Synchronization Connections.

Additional reading http://gj80blogtech.blogspot.com/2010/02/sharepoint-2010-installation_22.html.

Thursday, August 19, 2010

Sharepoint 2010 Publishing and Consuming Cross-Farm Services

In my previous post I discussed about how to set trust relationship between Sharepoint farms and in relation with that article I will discuss on this article about how to publish and consume cross-farm services. Cross-farm services in Sharepoint 2010 is the ability to publish and consume services that is running from different Sharepoint farms for example you can publish a search service or profile service and let other Sharepoint farm to subscribe to this service.

Setup Publishing Search Service

  • Log on to Central Administration and under Application Management click Manage services application.
  • On Service Applications page click on Search Service Application then click on Publish button located on the top of the page.

    image
  • Input the necessary information from the popup window when Publish button was clicked. Copy Published URL and save it somewhere else this will be useful when configuring consumer farm. Click OK button to continue. You need to set the trust relationship with another farm follow steps on my previous post.

    image
  • Add Search permission, by searching the consuming farm id. To get the consuming farm id log in to consuming farm and open Sharepoint 2010 Management Shell from Start > All Programs > Microsoft Sharepoint 2010 Products. Execute Get-SPFarm | Select Id as shown below.

    image
  • Add the consuming farm id to have full control access permission. Click OK to continue.

    image

Setup Consuming Farm

  • Log on to Consuming Farm, go to Central Administration > Application Management > Manage services applications
  • Click Connect > Search Service Proxy and type the Publishing URL and click OK and wait while it connects to proxy service.

    image
  • Click Search Service Application and click OK. Enter the Connection Name of the service and click OK. Wait while it finalize the connection and click OK once its done.
    image
  • Set the new search service proxy as a default search to a web application to do this go to Central AdministrationApplication Management > Web Applications and select the appropriate web application and click Service Connections on the ribbon. Click OK when done.

    image
  • Create Enterprise Search and then try to search something that should exists in the other farm and If everything was configured as expected you should get a search result.

Additional reading http://www.kowalski.ms/2010/07/16/sharepoint-server-2010-enterprise-service-application-publishing-and-consuming-farms/.

Configuring Sharepoint 2010 Trust Relationship with other Farm

In Sharepoint 2010 you can share service in different Farm they called it Cross-Farm Service application.

Sharing services is no longer exclusive to SharePoint Server, and services are no longer contained in Shared Services Providers (SSPs). In more details refer to this article http://technet.microsoft.com/en-us/library/cc560988.aspx.

You need to set the trust between farm before cross-farm service is enabled http://technet.microsoft.com/en-us/library/ee704552.aspx.

Exporting and copying certificates
An administrator of the consuming farm must provide two trust certificates to the publishing farm: a root certificate and a security token service (STS) certificate. An administrator of the publishing farm must provide a root certificate to the consuming farm.

You can only export and copy certificates by using Windows PowerShell 2.0.

To export the root certificate from the consuming farm
On the Start menu, click Administrative Tools.

  1. Click SharePoint 2010 Management Shell.
  2. At the Windows PowerShell command prompt, type each of the following commands:
  3. Copy Code

$rootCert = (Get-SPCertificateAuthority).RootCertificate

$rootCert.Export("Cert") | Set-Content <C:\ConsumingFarmRoot.cer> -Encoding byte

Where <C:\ConsumingFarmRoot.cer> is the path of the root certificate.

To export the STS certificate from the consuming farm
At the Windows PowerShell command prompt, type the following commands:

  1. Copy Code

$stsCert = (Get-SPSecurityTokenServiceConfig).LocalLoginProvider.SigningCertificate

$stsCert.Export("Cert") | Set-Content <C:\ConsumingFarmSTS.cer> -Encoding byte

Where <C:\ConsumingFarmSTS.cer> is the path of the STS certificate.

To export the root certificate from the publishing farm

  1. On the Start menu, click Administrative Tools.
  2. Click SharePoint 2010 Management Shell.
  3. At the Windows PowerShell command prompt, type the following commands:
  4. Copy Code

$rootCert = (Get-SPCertificateAuthority).RootCertificate

$rootCert.Export("Cert") | Set-Content <C:\PublishingFarmRoot.cer> -Encoding byte

Where <C:\PublishingFarmRoot.cer> is the path of the root certificate.

To copy the certificates

  1. Copy the root certificate and the STS certificate from the server in the consuming farm to the server in the publishing farm.
  2. Copy the root certificate from the server in the publishing farm to a server in the consuming farm.

Managing trust certificates by using Central Administration
You can manage trusts on a farm only after the relevant certificates have already been exported and copied to the farm.

To establish trust by using Central Administration

  1. Verify that the user account that is performing this procedure is a member of the Farm Administrators SharePoint group.
  2. On the SharePoint Central Administration Web site, click Security.
  3. On the Security page, in the General Security section, click Manage trust.
  4. On the Trust Relationship page, on the ribbon, click New.
  5. On the Establish Trust Relationship page:
    • Supply a name that describes the purpose of the trust relationship.
    • Browse to and select the Root Authority Certificate for the trust relationship. This must be the Root Authority Certificate that was exported from the other farm by using Windows PowerShell, as described in Exporting and copying certificates.
    • If you are performing this task on the publishing farm, select the check box for Provide Trust Relationship. Type in a descriptive name for the token issuer and browse to and select the STS certificate that was copied from the consuming farm, as described in Exporting and copying certificates.
    • Click OK.

After a trust relationship is established, you can modify the Token Issuer description or the certificates that are used by clicking the trust, and then clicking Edit. You can delete a trust by clicking it, and then clicking Delete.

Content Type Syndication with Sharepoint 2010

A new feature of Sharepoint 2010 is the ability to publish content types to all web application and site collections from a centralized Content Type Hub.

For more details about Content Type Syndication and with code example you can visit this url http://msdn.microsoft.com/en-us/library/ff394469.aspx.

To activate Content Type Syndication on Sharepoint 2010 follow the instructions below:

Go to Central Administration and under Application Management click on Manage service applications.

image

On Service Applications page locate and select Managed Metadata Service then click Properties button from the ribbon toolbar.

image

On property window enter the URL for the site collection (Content Type hub) from which this service application will consume content types then click Ok button to complete.

 image

Select Managed Metadata Service on Service Applications and click on properties from ribbon toolbar.

image 

Check “Consumes content types from the content type Gallery at …” from the Managed Metadata Service Connection property.

image

Now you can login to Content type hub which you defined from the above instruction.

Go to Site Settings > Galleries > Site Content Types click on one of the content types listed and notice that there will be a new link Manage publishing for this content type, click it.

image

Now you have the ability to publish content types to all Web Applications and Site Collections cool!

image