1

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?

0

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

https://stackoverflow.com/questions/46692/information-management-policy-in-sharepoint

hope it helps :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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