Adding Support for Multiple SharePoint 2010 Farms and the CASI Kit in Your WCF

Someone raised an interesting question the other day about the ability of a WCF application, that’s configured as described in Eric White’s blog ( and the CASI Kit Part 2 (  The configuration in these blogs describes modifying the web.config for the WCF so that it includes links to an issuer and issuerMetadata address, which is a SharePoint site Url, and the thumbprint for a SharePoint farm STS certificate.  So if have these values coded for a single farm, can a single WCF support requests from the CASI Kit in multiple farms?  Happily the answer is yes, but it does require one additional bit of configuration.

The basic elements that are configured in the WCF to build the trust between it and a SharePoint farm are:

  • The Url to a SharePoint site for issuer
  • The Url to a SharePoint site for issuerMetadata
  • The thumbprint of the farm’s token signing certificate used by the STS

The first two as it turns out are not a problem, because the CASI Kit base class programmatically overrides those values in the web.config, with the Url of the site from which the CASI Kit component is being invoked.  So that lets us remove those two items from the blocking list.  The last item is fortunately added to the web.config not as a single item, but really as one in an array of potential items.  Meaning it as added with a simple <add> tag, which means it supports adding multiple thumbprints that the WCF will support.  So here, for example, is what the web.config for my WCF looks like after I add support for two different farms to it:

<add thumbprint=”2e074b9965abc3434c20ed0be8bfe82b03e5c9f9″ name=”farm2″/>
<add thumbprint=”F53DE039BB2081E7DF6FEC03E8A644F3743A5A7C” name=”app1″/>

As you can see, you can just keep adding thumbprints to the list to support as many farms as you like, and the CASI Kit will take care of the rest for you.

One thought on “Adding Support for Multiple SharePoint 2010 Farms and the CASI Kit in Your WCF

  1. Härliga bilder och det är sÃ¥ gott med äpegpn!rolilt att du hälsade pÃ¥ inne hos mitt…..det är alltid lika trevligt att komma in här till ditt och titta pÃ¥ dina nya bilder!ha det sÃ¥ bra!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s