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