Itemupdating firing 2 times
I am able to fire an Event using an Event receiver which I created using Visual Studio 2010 on a custom list. I tried to debug the code and I saw that the Item Added event was getting executed twice. I had left the elements file for the Event Receiver there, and therefore when the feature was activated for the project, the receiver got associated to ALL custom lists on the site.
I have checked the SP Manager 2010 and it says its registered twice. Then, created a new feature and event receiver from scratch and deployed it.
Still, it was getting registered twice instead of once.
How can I find out if a workflow called my event receiver?
Is there a difference between a workflow which fires the event, or a user who fires the event?
Even a simple app to enumerate the event receivers associated to the list only showed the one instance. Well, I had moved on to other things again, when all of a sudden, I noticed that new tasks were being created in the task list for some documents that I was uploading to a different document library. That’s pretty much the symptom for a receiver associated to a list template, but this was NOT a list template! It wasn’t going to show up in the Event Receivers collection for that list instance, because it was associated to the list type.
When I added it to the list instance, it just caused the event to fire twice on THAT list.I had already covered all the basic things such as: I even went as far as completely emptying the body of the handler to see that in fact the event was firing twice.As with any problem, I always try to resolve it through the process of elimination by first isolating the core issue into a test project and therefore out of the primary project I’m experiencing it in because sometimes you can’t see the forest because of the trees. After creating the simple project, the problem was still there. The event wasn’t firing twice for the same list, it was firing for ALL Lists. I took another look at my event receiver I had added via Visual Studio to the project. Yes, I had left the file for the Event Receiver there, and therefore when the feature was activated for the project, the receiver got associated to ALL lists on the site.Every time an item was added to the custom list, the event was firing twice.I was associating the event receiver to the custom list through Feature Activated on a feature receiver for my Event Receivers project. uri=spotify:artist:4Kfw TCNq T3g Xele8WP3s5b&size=detail&theme=light So for the past week or so I’ve had this looming issue hanging over my head that I would try to nail down in-between other issues that I swear was going to be the death of me.