DownloadFileEx not working anymore


We use the MFilesAPI in a C# application to first create a new object with a file (Word-document), update it so it is ready to print (which we do after downloading it) and

then download it using the method Vault.ObjectOperations.DownloadFileEx().

This used to work fine until a few days ago (probably after the august update was installed).

Since then we get the following error/exception when DownloadFileEx() is called:

CoVaultObjectFileOperations.cpp, 518, Unbekannter Fehler. (0x80004005)
ServerVaultObjectFileOperationsHelper.cpp, 216, Unbekannter Fehler. (0x80004005)
ServerVaultObjectFileOperationsHelper.cpp, 872, Unbekannter Fehler. (0x80004005)
LatestRPC.generated.cpp, 23263, Unbekannter Fehler. (0x80004005)
RPCDocumentOperationsFileIO.cpp, 1596, Unbekannter Fehler. (0x80004005)
RPCDocumentOperationsFileIO.cpp, 196, Unbekannter Fehler. (0x80004005)
RPCObjectFileOperationsHelper.cpp, 90, Unbekannter Fehler. (0x80004005)
MCallInLoop.h, 521, Unbekannter Fehler. (0x80004005)
RPCDocumentOperationsHelper.cpp, 20923, Unbekannter Fehler. (0x80004005)
ViewerFiles.cpp, 305, Unbekannter Fehler. (0x80004005)
ViewerFiles.cpp, 1148, Unbekannter Fehler. (0x80004005)
ViewerFileGenerator.cpp, 59, Unbekannter Fehler. (0x80004005)
ViewerFileGenerator.cpp, 155, Unbekannter Fehler. (0x80004005)
ViewerFiles.cpp, 575, Unbekannter Fehler. (0x80004005)
ViewerFiles.cpp, 1071, Unbekannter Fehler. (0x80004005)
ViewerFiles.cpp, 691, Unbekannter Fehler. (0x80004005)
(M-Files 23.8.12892.6 2023-09-12T11:34:01.284Z)

The code which downloads the file is the following and was not changed:

// update the metadata in file so it is ready to print
ObjectVersion checklistToUpdate = InventoryVault.ObjectOperations.CheckOut(newChecklist.ObjVer.ObjID);
    checklistToUpdate.ObjVer, -1, true);
ObjectVersion updatedChecklist = InventoryVault.ObjectOperations.CheckIn(checklistToUpdate.ObjVer);

// prepare params for checklist download to temp
ObjectFile? checklistFile = null;
foreach (ObjectFile objFile in updatedChecklist.Files)
    checklistFile = objFile;
    break; // break after first file, since we only got one
if (checklistFile == null)
    throw new Exception("Checklist-File nicht gefunden!");
string filePath = System.IO.Path.Combine(
    System.IO.Path.GetTempFileName() + ".pdf");

// Download checklist as PDF
    checklistFile.ID, checklistFile.Version, filePath, MFFileFormat.MFFileFormatDisplayOnlyPDF);

Any idea what is causing this issue?

Thanks in advance


  • I can't see any specific issues having been reported with the August release (at least: not in my quick searching).  I can see some older similarly-worded exceptions where PDF conversions due to timeout and the like, but I don't think they're directly related.

    If nothing has changed (e.g. size of the source document, workflow this is going through, etc.), then maybe raise this with your reseller or support?  That way it can be perhaps investigated further, and we can track if this is a wider issue.

  • Thanks for your answer.

    Somehow DownloadFileEx() started working again a few days ago.
    We will be monitoring this in case it stops working again, but for now we will leave it be.

Reply Children
No Data