I've found a strange behaviour using Linq2SharePoint in a customcontrol. I run InsertOnSubmit on my EntityList<> and SubmitChanges() afterwards. The following 'exception' occurs on InsertOnSubmit: Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack

I played arround with the SharePoint-Permissions on the list I'm working with an recognized that the exception only fires if the user does not have ManageList Permission.

Anybody got an idea why ManageList is required. I don't want everybody who adds elements to the list to manage it.

[Update: I'found the problem. It was caused by by Securitybits in List Definition. Make sure they are set to "11". Using "14" only allows users having managelist permission are allowed to update items.] Thanks Stefan

2 Answers 2


Are you working with console app while testing your linq queries? Often programmers forget to switch console app from x32 to x64 while working with SharePoint. I sow similar errors.

  • No, I'm not using the console. I'm working on a usercontrol. Jan 14, 2013 at 10:42

I resolved the issue by granting permission "Contribute" to visitors Group for this specific list

  • Giving "Contribute" permissions to Visitors is not a good idea. Visitors are supposed to view-only or max Read. Jan 1, 2015 at 14:28

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.