error with deploy using CAS Files

Nov 24, 2008 at 10:12 AM
Edited Dec 3, 2008 at 9:46 AM
I am trying to deploy a solution using CAS files so there is no need to put the Trustlevel to Full. After some trouble getting the CAS file to be picked up this now seems to work fine. I do have a problem still.

[SecurityException: Request for the permission of type 'Microsoft.SharePoint.Security.SharePointPermission, Microsoft.SharePoint.Security, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c' failed.]

I am referencing a DLL from a different Solution, as soon as I call upon this code the error is shown. I see that a PermissionSet is being generated for this assembly but the levels are not as high as the others. Also there is no safe control entry for this assembly. I also notice that after deploy wspbuilder genereated a new custom config based upon minimal. (wss_custom_wss_minimaltrust.config)

I am using the following command in my createwsp.bat : 

.\WSPBuilder\wspbuilder -wspname MeetingPlanner.Setup.wsp -CustomCAS .\WSPBuilder\CustomCas.perm -SolutionId 337bb98b-e746-4ffb-a722-b05b5f0b9828 -cleanup false -PermissionSetLevel Medium

For some reason it is still building a Custom Config file based upon WSS_Minimal, could this by all means be responsible for the security error I'm getting or am I missing something else?

Kind regards Dave