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?

1 Answer 1


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 :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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