Using Config Store with WSPBuilder

Jun 9, 2009 at 8:48 AM

Has anyone used WSP Builder to package a solution that uses the Config Store ( and deploys to the bin directory of the web application?

When I try to referecne the config store in my code behind file I get this exception...

System.Security.SecurityException: That assembly does not allow partially trusted callers

I've added the partially trusted callers attribute to my project

[assembly: AllowPartiallyTrustedCallers()]

and the sharepoint permissions attributes on my methods

[SharePointPermissionAttribute(System.Security.Permissions.SecurityAction.Demand, Impersonate = true)]
[SharePointPermissionAttribute(System.Security.Permissions.SecurityAction.Demand, ObjectModel = true)]

But this hasn't seem to have done anything, I've also specified a custom CAS policy with the correct IPermission

<IPermission class="Microsoft.SharePoint.Security.SharePointPermission, Microsoft.SharePoint.Security, version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" version="1" ObjectModel="True" UnsafeSaveOnGet="True" Unrestricted="True" />

And still no success, surely other people have done this, I must be missing something

I'm using WSP Builder version 1.0.5.