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

1 Answer

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
add comment

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.