Anyone who has had to develop a SharePoint event handler has probably run into some trouble. This path is fraught with danger and as far as I can see the general advice when coming up against an issue is “gorn work around it and leave me alone”. So here are some links and tips for getting past the usual suspects:
Event Trouble Shooting -is this a known problem or are you just “Special”
Codeplex Handler Management Page – this is a handy feature that allows you to see what handlers are associated with a site, list, content type..
Everything Eventful – great post for Getting Started with SharePoint events. Everything from writing a receiver to attaching and troubleshooting.
Tip – When in doubt, used ED events instead of ING events. Make sure you do some of this though:
bool auu = web.AllowUnsafeUpdates;
web.AllowUnsafeUpdates = true;
….. do stuff to handle the event
web.AllowUnsafeUpdates = auu;
Tip- Document libraries are a bit different from standard lists. Mainly because when a document is uploaded, there are 2 sets of events. You will notice that when you upload a document, if you click Cancel at the Edit Form (complete doc metadata stage), the document will still appear in the library. So the itemadding, added, updating, updated events have fired already. When you complete the metadata for the document, they fire a second time.
Tip- Check your fields are A-OK. If you have a faulty field definition deployed uisng a feature it may have an invalid attribute that was not revealed when it was deployed. Sometimes this can cause items to ignore new property values altogether. Try removing custom fields and updating/adding items to see if the problem persists.