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'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

share|improve this question

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.

share|improve this answer
No, I'm not using the console. I'm working on a usercontrol. – Stefan Hennicken Jan 14 '13 at 10:42

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

share|improve this answer
Giving "Contribute" permissions to Visitors is not a good idea. Visitors are supposed to view-only or max Read. – Arsalan Adam Khatri Jan 1 '15 at 14:28

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.