UPDATE: An anonymous poster left a great comment about internal names. Be sure to read it.
When working with event receivers and other code that references SharePoint list items via the object model, I often make mistakes that generate this error at runtime:
Error loading and running event receiver Conchango.xyzzyEventReceiver in xyzzy, Version=188.8.131.52, Culture=neutral, PublicKeyToken=0dc50a750396c3ac. Additional information is below. : Value does not fall within the expected range.
I think this is a fairly generic error that is potentially caused many different ways. However, one simple explanation is that I’m referencing a field incorrectly. If the name of the field is "Due Date", I must reference it like this in an event receiver:
When I misspell or use the wrong case when referencing the field, SharePoint generates the above mentioned runtime error. For example, this is wrong:
Subscribe to my blog.