Free Support Forum - aspose.com

Error when using ConvertHTML in web application

I’m converting an html file to pdf, using the code below. This code works fine in a console application. When I run the same code in a .NET Framework 4.8 web application, the app pool recycles and an Event Log message is written: Application popup: w3wp.exe - System Error : A new guard page for the stack cannot be created.

        using (HTMLDocument htmlDocument = new HTMLDocument(htmlFileName))
        {
            Aspose.Html.Saving.PdfSaveOptions pdfOptions = new Aspose.Html.Saving.PdfSaveOptions();
            Aspose.Html.Converters.Converter.ConvertHTML(htmlDocument, pdfOptions, pdfFileName);
        }

@dbartle

Could you please share a sample web application with us which is able to reproduce the issue? We will test the scenario in our environment and address it accordingly.

AttachedAsposeWebTest.zip (33.1 KB)