Tag Info

Hot answers tagged


I would try the following: Get the List again from the elevated Web instead of the instance you pass to this method. Try searching your eventreceiver additional by assembly or classname to make sure you don't delete some SharePoint internal Receiver. finally{ web.AllowUnsafeUpdates = false;}


my issue got resolved with help of below link https://dotnetadil.wordpress.com/2012/04/11/sharepoint-item-deleting-event-receiver-deny-delete/ I used below code public override void ItemDeleting(SPItemEventProperties properties) { base.ItemDeleting(properties); using (SPWeb web = properties.OpenWeb()) ...


It's mostly likely because you already have an instance of the SPList (from another context) before you try to execute the deletion of an EventReceiver. That's why the ThreadAbortionException is thrown. Instead of sending in the list, send its name instead and get the list inside the RunWithElevatedPrivileges codeblock. private void ...

Only top voted, non community-wiki answers of a minimum length are eligible