Cannot delete an item in a document libaray
-
2011年6月6日 9:50
I have set item level secuirty on a document library folder, but when I try to delete the folder as a Site Admin I get acess denied. I try to Manage Permissions I get the following error in the log.
Unexpected System.Runtime.InteropServices.COMException:
Cannot complete this action. Please try again. at Microsoft.SharePoint.Library.SPRequestInternalClass.GetSecurityInfo(String bstrUrl, String bstrObjUrl, Guid& pguidScopeId, UInt64& pEffectivePermMask, Boolean& pbHasUniquePerm, String& pbstrPermUrl) at Microsoft.SharePoint.Library.SPRequest.GetSecurityInfo(String bstrUrl, String bstrObjUrl, Guid& pguidScopeId, UInt64& pEffectivePermMask, Boolean& pbHasUniquePerm, String& pbstrPermUrl)
jamtoday
すべての返信
-
2011年6月6日 10:20
Dear Paul,
Are you logged in as the Site Collection Admin? Otherwise, try to assign the rights as Farm Account user. This should work in any case.
Thanks and best regards,
Martin
Martin W. Angler, MCTS
Blog angler.wordpress.com
Twitter: Follow me on twitter -
2011年6月6日 10:52
Hi,
There might be some Itemdeleting Event imposed on that item in document library
properties.cancel=true;
like that...
Check for that....
Thanks, Sudhanshu Shekhar -
2011年6月6日 12:28
Hi,
I have tried as a site administrator and a farm administrator to delete the folder through the web interface. If I try to Manage Permissions I get the error above. The setting of item permissions is done via code.
KR
Paul
jamtoday -
2011年6月6日 15:26
Hi,
if you want to set the permissions programmatically, then I would suggest you try to run it within an SPRunWithElevatedPrivileges block, as described here:
Please let us know whether this was of some help.
Thanks,
Martin
Martin W. Angler, MCTS
Blog angler.wordpress.com
Twitter: Follow me on twitter -
2011年6月7日 8:06
Hi Martin,
Thanks, the event handler runs with elevated privileges. Its sets the permissions on a folder in the root of the library, this folder contains subfolders and the subfolders documents. A Web Service provided by another supplier creates the root folder, the sub folders and uploads documents
The problem arose because of unforeseen interaction between the Web Service and the item event handler. The Web Service did not have site admin privileges and did not use run with elevated privileges.
The Web Service starts creating the folders, creates the root and then the subfolders. While this is happening my list item event handler fires and changes the permissions on the newly created root folder, this prevents the Web Service from creating all the subfolders because of lack of privileges.
The Web Service also left the root folder in a strange state where neither a farm admin or site collection admin can delete it.
Paul
jamtoday -
2011年8月15日 9:15
Hi,
We had multiple occurrences of this behavior at our company. Permissions of an item cannot be accessed (throws the exception in OP), item cannot be updated/deleted (access denied), not even by System account. We have only been able to delete that item by using proc_DropListRecord stored procedure directly on the content database. Anybody knows what causes this? Any information would be appreciated.
Thanks
-
2012年4月20日 7:19
NecroSkillz - Thanks for the info - although not ideal - at least it has allowed me to carry on developing.
I've written some instructions on how to use the stored proc you mentioned on my thread.
Thanks Again
Adrian
http://www.tech-wales.co.uk -
2012年5月1日 22:26
hi,
Thanks, it is good to see a tech company in Wales, i'm Welsh myself.
Paul
jamtoday
-
2012年7月11日 6:30
Hi,
It may not be the best way. But can you try to delay the execution on item added code(assuming you are using itemadded event). So that by that webservice finish execution and your event reciever code gets executed.
Please mark as helpful if it is really helpful

