Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

1 Answer 1

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

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

hope it helps :)

share|improve this answer

Your Answer

 
discard

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.