Sharepoint: Is it possible to automate the deployment of a custom CAS policy?

Posted by user332133 on Stack Overflow See other posts from Stack Overflow or by user332133
Published on 2010-05-04T08:42:37Z Indexed on 2010/05/04 8:48 UTC
Read the original article Hit count: 303

Filed under:
|
|
|

Hi all,

I'm looking for a way to automate the deployment of a custom CAS policy in SharePoint.

What i would like to achieve is the following:

All assemblies that have been built and signed by our build server (with a secret key) should run in SharePoint under the 'higher than normal' trust level.

Now I can manually edit the cas policy files to include something like this:

        <CodeGroup class="UnionCodeGroup" version="1" PermissionSetName="MyPermissionSet" Name="[My Company public key]" Description="Grants all ">
          <IMembershipCondition class="StrongNameMembershipCondition" version="1" PublicKeyBlob="[public key goes here]" />
        </CodeGroup>

And that works great. However, we have several huge sharepoint farms, with many applications running on it. I'd like to avoid having to manually edit all policy files to include this xml snippet.

Is there a way to automate this? For example, from a feature?

With kind regards, Erwin van der Valk

© Stack Overflow or respective owner

Related posts about sharepoint

Related posts about cas