A Practical Guide to SharePoint 2013

A Practical Guide to SharePoint 2013
A Practical Guide to SharePoint 2013 - Book by Saifullah Shafiq

Monday, August 28, 2006

SharePoint: "Cannot complete this action" error


 
If your SharePoint custom application stops working and you get "Cannot complete this action" error, then here is the solution:

http://support.microsoft.com/?id=909455

According to Microsoft, after installing WSS SP2, users will have to impersonate explicitly to avoid the error. Following are some error messages that you would get:

"Cannot complete this action."

"Microsoft.SharePoint.SPException: Cannot complete this action."

"System.Runtime.InteropServices.COMException (0x80004005): Cannot complete this action."

Detailed Error Message:

Please try again.
at Microsoft.SharePoint.Library.SPRequestInternalClass.OpenWebInternal(String bstrUrl, String& pbstrServerRelativeUrl, UInt32& pnLanguage, UInt32& pnLocale, String& pbstrAlternateCSSUrl, String& pbstrCustomJSUrl, String& pbstrAlternateHeaderUrl)
at Microsoft.SharePoint.Library.a.a(String A_0, String& A_1, UInt32& A_2, UInt32& A_3, String& A_4, String& A_5, String& A_6)
--- End of inner exception stack trace ---
at Microsoft.SharePoint.Library.a.a(String A_0, String& A_1, UInt32& A_2, UInt32& A_3, String& A_4, String& A_5, String& A_6)
at Microsoft.SharePoint.SPWeb.f()
at Microsoft.SharePoint.SPWeb.get_ServerRelativeUrl()
at Microsoft.SharePoint.SPWeb.get_Url()
at Microsoft.SharePoint.SPWeb.c(String A_0, Boolean A_1, Boolean A_2)
at Microsoft.SharePoint.SPWeb.f(String A_0)
at Microsoft.SharePoint.SPWeb.GetFile(String strUrl)
at EnPointe.SharePoint.CCM1.LibraryEventSink.OnUpdate()System.Runtime.InteropServices.COMException (0x80004005): Cannot complete this action.

Please try again.
at Microsoft.SharePoint.Library.SPRequestInternalClass.OpenWebInternal(String bstrUrl, String& pbstrServerRelativeUrl, UInt32& pnLanguage, UInt32& pnLocale, String& pbstrAlternateCSSUrl, String& pbstrCustomJSUrl, String& pbstrAlternateHeaderUrl)
at Microsoft.SharePoint.Library.a.a(String A_0, String& A_1, UInt32& A_2, UInt32& A_3, String& A_4, String& A_5, String& A_6) at Microsoft.SharePoint.Library.a.a(String A_0, String& A_1, UInt32& A_2, UInt32& A_3, String& A_4, String& A_5, String& A_6)
at Microsoft.SharePoint.SPWeb.f()
at Microsoft.SharePoint.SPWeb.get_ServerRelativeUrl()
at Microsoft.SharePoint.SPWeb.get_Url()
at Microsoft.SharePoint.SPWeb.c(String A_0, Boolean A_1, Boolean A_2)
at Microsoft.SharePoint.SPWeb.f(String A_0)
at Microsoft.SharePoint.SPWeb.GetFile(String strUrl)
at EnPointe.SharePoint.CCM1.LibraryEventSink.OnUpdate()Microsoft.SharePoint

For more information, see Help and Support Center at ...

--
SSA

  eddy writes:
4/5/2007 #
For me, it works if I impersonate as ...myself:

System.Security.Principal.WindowsImpersonationContext wic = null;
wic = System.Security.Principal.WindowsIdentity.GetCurrent().Impersonate();

SPSite site = new SPSite(...);
SPWeb web = site.OpenWeb(...);

....

wic.Undo();

No comments:

Post a Comment