none
Cannot delete Custom Event Receiver, which was installed for ListTemplateId RRS feed

  • Question

  • Friends,

    i had today strange issue. I created a custom event receiver for document library (for events ItemAdding and ItemAdded) and installed it. After it I deployed a new version of solutions and retracted it back. There is no DLL in the GAC, no event receivers in my document library, BUT it still works, i cannot understand HOW... 


    Using powershell script I checked my webapplication that to find and delete my event receiver. I deleted all instances of it, but it didn't help me.

    I think I did one big mistake, I installed event receiver for all document librraies:

    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
      <Receivers ListTemplateId="101" Scope="Web">
          <Receiver>
            <Name>TasksProtocolEventReceiverItemAdding</Name>
            <Type>ItemAdding</Type>
            <Assembly>$SharePoint.Project.AssemblyFullName$</Assembly>
            <Class>TasksProtocolEventReceiver.TasksProtocolEventReceiver</Class>
            <SequenceNumber>10000</SequenceNumber>
          </Receiver>
      </Receivers>
    </Elements>

    Please advice me how to delete it from my sharepoint.



    from MSDN forum...

    Friday, March 10, 2017 9:02 PM

All replies

  • I tested on different sites and different web-applications on my sharepoint portal. If I create a document library and upload file , I see a result of my custom event receiver .

    from MSDN forum...

    Friday, March 10, 2017 9:05 PM
  • Hi Evgeny,

    As I understand, the event receiver is based on list template type, so if it is created for document library, then all document libraries will be affected by the event receiver.

    To delete the event receiver, please refer the link below:

    Add, Modify or Delete List Event Receivers with PowerShell

    Thanks

    Best Regards


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com


    Monday, March 13, 2017 11:40 AM
  • Hi Evgeny,
    If possible, you can try to run IISReset to restart the iis, there may be some cache.
    If not work, cound you post your code\script to here?
    Monday, March 13, 2017 12:11 PM
  • hello, try to make iisreset (on all servers of the farm), restart Sharepoint Timer service (OWSTIMER) and restart all PowerShell consoles if you have them (I don't know your scenario so it is safer to restart everything). Processes cache assemblies when they are first used, so it may be so that old version is used from the cache.

    Blog - http://sadomovalex.blogspot.com
    Dynamic CAML queries via C# - http://camlex.codeplex.com

    Monday, March 13, 2017 3:18 PM
  • Hi Jeff,

    thank you very much for help and advices! I found a reason of my issue. It was simply, but I spent many time. The details are below.

    In my case the reason was not in event receiver itself. I retracted solution, made issreset many times, delete all event receivers, but no  luck.

    In the end, I found the reason. My event receiver fires on file uploading and set value to the custom column. 

    When you upload a file to document library and in the library there is a custom column 'MyColumn', then to the file will be automatically added a property 'MyColumn' with value from this column. When after it you download it from document library and try to upload once again, then to the column "MyColumn" will be added value from file property "MyColumn". 

    


    from MSDN forum...

    Tuesday, March 14, 2017 6:26 AM