SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have some code:

            SPFieldMultiChoice category = (SPFieldMultiChoice)contentType.Fields["Category"];

Where contentType is a SPContentType instance.

This works fine as part of some code that runs in SPSecurity.RunWithElevatedPrivileges(). Well, that is until I configure an information management policy on the content type. Now it throws a security exception... "That assembly does not allow partially trusted callers. mscorlib"

If I turn the retention policy off everything is fine again... What am I doing wrong? Do I have to set my solution up as fully trusted?

share|improve this question
up vote 0 down vote accepted

Your not the first to ask this question ;) , I hope this article answeres your question :) sounds like you have run into the same issue

hope it helps :)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.