After creating a custom ItemAdded event handler and installing it on a list, a decision was made to move to a completely different SharePoint site. It works great on the old site, but after installing the .dlls on the new machines and registering the event with the list, it doesn't appear to be firing at all. I know for a fact that the item is there because I wrote a little app that will loop through the SPEventRecieverDefinitions for a given list/library and spit out the assembly names, and sure enough, my assembly shows up there.

Here are a few thoughts so no one thinks I'm a complete idiot:

  • The assembly only references the Microsoft.Sharepoint.dll and Microsoft.Office.Server.dll, so I don't think it would be getting hung up there.
  • I made sure to install my custom classes .dll into the GAC of all three machines that house the site.
  • I've tried about a million iisresets and even rebooting all three machines that house the SharePoint site.
  • I've gone as far as to comment out all the code and just have it try and email me to give some indication that the event fired, but that doesn't work.
  • Looking at the extensive Trace Log, nothing looks to be throwing an exception.
  • The dlls have been added to the appropriate inetpub\*\bin folder on each of the servers.

The problem sounds to me like the event just isn't firing. Another thought occured that maybe there is a setting within SharePoint that needs to be set( ). My real problem is that there is no way to debug on our production machine, but even if we were, I have a hunch that the code would not be firing. Is there another place I can look for an indication of what is going on

I appreciate anyone's help with my problem. Thanks in advance.

Re: SharePoint - Development and Programming Item Added Event Not Firing (?)


Hey dark,

why dont you send yourself a mail at the beginning of the code write:
using Microsoft.SharePoint.Utility

SPWeb web = properties.OpenWeb();
SPUtitility.SendEmail(web, false, false, mailaddress, subject, fullmessage);

so its quite easy to find out if the event is firing or not.

Re: SharePoint - Development and Programming Item Added Event Not Firing (?)


I ended up clearing out all the code, save for an email sent to me that just said, "Event Fired." This still did not work. The very next morning, the server maintenance guys had done a bunch of updates/reboots and the event was firing. I can only assume that the service was cached somewhere with an error.