most common online dating scams - 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.

Is there any particular reason that this is executing in such a manner? And in the Feature Activated event, I was stapling the event to the particular custom list.

itemupdating firing 2 times-11itemupdating firing 2 times-22itemupdating firing 2 times-70

So, in effect, the Event receiver was getting attached to my particular custom list twice, ie, from the elements file & feature activated event.

So, i just deleted the elements file of the event reveicer and it WORKED!!! You should check if your item Added event handler has not been registered twice.

It appears as though they are firing twice in this situation because Share Point is updating the properties on the document and then checking it in on the same request.

If you were to check the document out and edit the properties on the document, you would see the Item Updating and Item Updated events fire once.

Documents are only added or updated in this library from the Content Organizer via a custom Event Receiver/OOTB Approval Workflow combo on multiple Document Center Workspaces--which exist in their own Site Collections.

Last modified 20-Jun-2017 06:01