SharePoint:“System.Runtime.InteropServices.COMException (0x81071003)”是什么意思?

SharePoint:“System.Runtime.InteropServices.COMException (0x81071003)”是什么意思?

你好,

我有一些将文档导入 SharePoint (WSS 3.0 SP1) 文档库的代码。
该代码大多数时候都能正常工作,但有时文档无法导入文档库,而我却收到这个令人讨厌的异常。

Microsoft.SharePoint.SPException: Unable to update the information in the Microsoft Office document myFileName. ---> System.Runtime.InteropServices.COMException (0x81071003): Unable to update the information in the Microsoft Office document myFileName.
bei Microsoft.SharePoint.Library.SPRequestInternalClass.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish)
bei Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish)

这个异常是什么意思?为什么它只是偶尔发生?

谢谢!

答案1

可能更适合 StackOverflow,但总而言之,这意味着与 Office 通信的 .NET 代码存在问题(非常粗略的解释)。

0x81071003 是来自 COM 方法的 HRESULT 代码,我猜想该方法在 SP API 中被内部调用。当抛出此异常时,请检查您提供给 SP 的文档,也许可以尝试手动上传它以查看是否给出了更具体的错误。

答案2

以下是报告的同一问题social.technet.microsoft.com

这个解决方案对你有用吗?

相关内容