SharePoint: what does “System.Runtime.InteropServices.COMException (0x81071003)” mean?

Tag: sharepoint Author: chenzaixian8998 Date: 2009-07-18

Hallo,

i've got some code that imports documents into a SharePoint (WSS 3.0 SP1) document-library.
That code works most of the time without any problems, but sometimes the document is not imported into the document-library and i get this nasty exception instead.

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)

What does this exception mean? And why does it occur only sometimes?

Thanks!

P.S.: I asked this question originally on ServerFault, here is the link

Duplicate. It should be migrated to Stackoverflow, so that the answers are moved here too!
Can you edit the question and include the snippet of your code that imports the document? Please show the line that causes the exception.

Other Answer1

Well the exception is raised by a COM assembly which has been wrapped by .Net code (hence the COMException).

Without seeing the code that causes the exception its hard to say why its being caused as COMExceptions are invariable non-specific.

There seems to be some more information here: http://mqsharepoint.blogspot.com/2007/06/exception-0x81071003-unable-to-update.html

Other Answer2

Kudos to F5ToDebug, for setting me on the right track!

The exception occured when MS Office-documents were imported, so it was likely that the part of SharePoint causing the exception is the document parsing process.
I disabled the SPWeb.ParserEnabled Property following Joe Rodgers How to Disable Property Promotion In WSS as a workaround.
That worked, all the documents are imported!