views:

169

answers:

1

Hi, I've made an event handler on a list (with the ID of the custom list) with a feature. I activated the feature, but my Event Handler Code is never called (the ItemAdding method).

My question is if there is something that can tell me if the list I created is really tied up with my Event Handler? I've seen something on CodePlex but it was for MOSS, is there something available for WSS or "out of the box"?

+1  A: 

I've found that you can use Sharepoint Manager : http://www.codeplex.com/spm

You can browse to your list and check under "Event Receiver". If your Event Handler is there, then it should be tied up to your list.

In my case it's there but It's called for whatever reason.. I'll have to investigate on that.

UPDATE :

Well, it seems that when SharePoint raises an exception in an Event Handler, it doesn't write any error message and continue like nothing happened, so be sure to debug line by line to check if all your code is called!

Anywhere there is custom code that isn't part of the ASP.NET rendering engine this can happen. A while ago I got into the habit of adding try / catch System.Exception for every overridden method so I can log and rethrow it.
Alex Angas