Failed to load DOC file with Aspose Word for Net 21.7

I am trying to load the attached doc file with Aspose.Words .NET 21.7 but there is an exception with the message The document appears to be corrupted and cannot be loaded. and InnerException message Capacity must be positive. Parameter name: capacity while the file is opened successfully. Can you review the sample and give me advice?

var doc = new Document(@“sample.doc”);
catch (Exception e)

Thanks (13.0 KB)


We have tested the scenario and managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-22534. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-22534) have been fixed in this Aspose.Words for .NET 21.8 update and this Aspose.Words for Java 21.8 update.