I created a custom Event Receiver using WSP builder, and in elements.xml file i have given the ID of list which i find in elements.xml of List definition of particular list.

I also activated the feature, but event handler isn't triggering, neither can i attach my code as symbols are not loaded, i tried attaching it to OWSTimer.exe.

here's the element.xml for the event handler feature

<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Receivers ListTemplateId="11021">
      <Assembly>ListEventReceiver, Version=, Culture=neutral, PublicKeyToken=gfhfghfghfghgfhgfh</Assembly>

List's element.xml file is

   <?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
        Image="/_layouts/images/itdl.gif" />


I was assigning a DateTime Parameter to a String without converting it, which was throwing the error and didn't let w3wp.exe to load the event handler.

I recommend everyone to use Microsoft ULS Viewer for debugging

  • 1
    Unless the adding is happening in a timerjob you should not attach to OWSTimer, if you're adding though the UI you should attach to w3wp.exe. Anything in ULS log? Commented Jul 25, 2012 at 19:01
  • Just added ULS Log Viewer, but there are so many things happening in a second, how would I know what is wrong, or do I have to go through all of them Commented Jul 26, 2012 at 8:12
  • I downloaded Microsoft ULS viewer and its telling me the exact error, which I am about to solve thanks alot :D Commented Jul 26, 2012 at 8:19

1 Answer 1


I would try multiple things:

  1. Add "Synchronous" to your event -just to avoid issue with multiple threads being spawn and makes it easier to debug.
  2. Use any tool such as Events Manager (http://speventreceiverman.codeplex.com/) or the SharePoint Manager to actually check that once your list is created you do have the handlers attached.
  3. Assuming that is attached, make sure you detach it as declarative attaching it, not sure that upon next deployment, simply the new one gets chained - this could also explain why even if successfully attached you are not getting the debugger to stop
  4. Finally - either attach your event handler to a Content Type (if you built your own custom list template, probably you also have a List Definition there, and you are 1 step away from having a content type used). If that is too much of a hassle, than at least, use code-based activation via the Feature Activation/Deactivation to attach/detach.

Hope this give you some tracks to follow!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.