Aspose.HTML offers the functionality to convert HTML file as well as an URL into other file formats. We tried to use the below sample code snippet to convert an URL to MHTML. However, the process was terminated due to a StackOverFlowException:
using (var document = new Aspose.Html.HTMLDocument("https://www.google.com"))
// Initialize MHTMLSaveOptions
var moptions = new Aspose.Html.Saving.MHTMLSaveOptions();
// Convert HTML to MHT
Aspose.Html.Converters.Converter.ConvertHTML(document, moptions, dataDir + "output.mht");
Please note that during testing, the API was able to generate a PDF from an URL. Nevertheless, we have logged an issue as HTMLNET-3330 in our issue management system to further investigate this scenario. We will look into its details and keep you posted with the status of ticket resolution. Please be patient and spare us some time.
We are sorry for the inconvenience.