×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

code access security

Why isn't custom CAS policy working? by matsui
Posted: 13 Jul 09 (Edited 14 Jul 09)

Grant All Needed Permsissions
One thing that's easy to misunderstand when you create your first custom CAS policy is that you have to grant *all* of the permissions that your code needs to execute.  If you only grant the additional permissions that it would need based on the defaults, then it won't work.  This is because when you create a custom CAS policy, your code is assigned to that policy instead of the original policy, so anything you needed in the original policy needs to be included in the custom policy.  For more details see this blog article: http://blogs.windwardreports.com/tomasr/2009/07/sharepoint-custom-cas-policies-grant-all-of-the-permissions-you-need.html

Watch Out For Comments
If you place an XML style comment in a permission set, only the permissions above that set are actually added to SharePoint upon installation of your CAS policy (the comment goes in as well for some reason).  So, if you have a permission that you think should be granted, but it is not, double check for comments.

Back to Microsoft: SharePoint FAQ Index
Back to Microsoft: SharePoint Forum

My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close