0

我有一个在 Azure App Service 上运行的 .NET Core 3.1 Web 应用程序,它使用 SelectPdf 将一些 HTML 文档转换为 PDF。它在我的本地主机上运行良好,但是一旦我发布到 Azure,无论我的 HTML 文档多么小/简单,我都会收到以下错误:

System.Exception: Could not get conversion result header. Data transfer error. Data transmission error 109
   at SelectPdf.HtmlToImage.ᜀ(String A_0, String A_1, String A_2, ជ& A_3, String& A_4)
   at SelectPdf.HtmlToPdf.ᜁ(String A_0, String A_1, String A_2, String A_3, Boolean A_4)
   at SelectPdf.HtmlToPdf.ConvertHtmlString(String htmlString)

我当前的应用程序服务在基本的开发/测试计划中(这是否重要)?

4

1 回答 1

0

披露:我为 SelectPdf 工作。

恐怕你在 Azure 上使用什么计划很重要。Azure 有很多限制,SelectPdf 使用 Azure 上的备用渲染引擎。要在您的计算机上测试它,您需要设置:

GlobalProperties.EnableRestrictedRenderingEngine = true;

SelectPdf 需要从 Basic 开始的 Azure 应用服务计划(不适用于免费/共享计划)。

可以在此处找到有关部署到 Azure 的更多详细信息: https ://selectpdf.com/docs/SelectPdf-Microsoft-Azure.htm

于 2021-08-16T10:47:25.623 回答