你好,
我有一些将文档导入SharePoint(WSS 3.0 SP1)文档库的代码。
该代码在大多数情况下工作没有任何问题,但有时文档不会导入到文档库,而我得到这个讨厌的exception。
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)
这个例外是什么意思? 为什么只有时有发生?
谢谢!
可能更适合于StackOverflow,但总的来说,这意味着与Office通信的.NET代码存在问题(非常粗略的解释)。
0x81071003是一个COM方法的HRESULT代码,我猜在SP API中被内部调用。 当抛出这个exception时,请检查您正在提供给SP的文档,也可以尝试手动上传以查看是否给出了更具体的错误。
这是Social.technet.microsoft.com上报告的相同问题
这个解决scheme是否适合你?