We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Convert MHTML using C# on .NET 4 & Avoid File Corrupted Exception | Root Resource is not Found in a Multipart Structure

Hi, the attached MHtml file throws FileCorruptedException when it is opened with Aspose.Words 21.2 for .Net 4.
The issue is new because the same file can be opened fine with Aspose.Words 20.10.

image.png (22.6 KB)

Best Regards,
Vassil224869_Regression.zip (247.3 KB)

@DWProject,

You are right; the latest 21.2 version of Aspose.Words for .NET API throws File Corrupted Exception upon converting MHTML file.

Aspose.Words.FileCorruptedException
HResult=0x80131500
Message=The document appears to be corrupted and cannot be loaded.
Source=Aspose.Words
Inner Exception 1:
InvalidOperationException: Root resource is not found in a multipart structure.

We have logged this problem in our issue tracking system. The ID of this issue is WORDSNET-21789. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.

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