Friday, February 25, 2011

Installing SharePoint Claims Providers

If you have downloaded the sample code for a Custom Claims Provider from MSDN Code Gallery such as from here:

http://archive.msdn.microsoft.com/odcsp14ta/Release/ProjectReleases.aspx?ReleaseId=4375

You will find that there is a document within the solution called instructions.txt.

If you open the document, these are the contents of the file:

1.  Install assembly to GAC.
 
To Install Feature:
1a.  install-spfeature -path SqlClaimsProvider
NOTE:  No need to enable / activate because it is a farm-scoped feature.
 
To Uninstall Feature:
1b.  uninstall-spfeature -identity SqlClaimsProvider

Unfortunately, if you attempt to run the command "install-spfeature -path SqlClaimsProvider", you will receive the following error message: "Failed to find the XML file at location 14\Template\Features\SqlClaimsProvider"

Well, as you can probably guess, the documentation provided in instructions.txt is incomplete.  If you read this MSDN article, you will find additional details on how to utilize install-spfeature:

http://msdn.microsoft.com/en-us/library/ff607825.aspx

Based on this article, you will actually need to do the following to successfully install the SqlClaimsProvider as a farm level feature:

  1. Open Windows Explorer
  2. Navigate to the following directory structure: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES
  3. Create directory called SqlClaimsProvider
  4. Beneath this directory, copy the file feature.xml from the Visual Studio solution
  5. Now, open the SharePoint 2010 Management Shell
  6. At the PowerShell command prompt, type install-spfeature -path SqlClaimsProvider
  7. This should now successfully install the SqlClaimsProvider as a farm level feature


No comments:

Post a Comment