gpt4 book ai didi

azure - EvoPDF 库在 Windows Azure 托管站点上失败

转载 作者:行者123 更新时间:2023-12-02 22:02:34 24 4
gpt4 key购买 nike

EvoPDF HTML 到 PDF 转换库 (http://www.evopdf.com/) 声称它支持 Windows Azure 云平台,但我无法让它工作。我得到了异常(exception):

[Exception: Could not get conversion result header. Data receive error. Could not receive data. Error code: 109]
EvoPdf.HtmlToPdf.ImgConverter.GetLayoutFromUrl(String url, ps& htmlParseInfo) +622
EvoPdf.HtmlToPdf.PdfConverter.ConvertAndGetPdfDocument(String url, String htmlString, String baseUrl, String internalLinksDocUrl, Boolean fromUrl) +9748
EvoPdf.HtmlToPdf.PdfConverter.ConvertAndSaveToStream(Stream outStream, String url, String htmlString, String baseUrl, String internalLinksDocUrl, Boolean fromUrl) +61
EvoPdf.HtmlToPdf.PdfConverter.SavePdfFromUrlToStream(String url, Stream outPdfStream) +20

这看起来像是在库通过 Web 请求获取 HTML 内容时失败了。 Azure 中是否有任何内容可以阻止传出 Web 请求?

该库部署为两个 DLL,一个 native DLL 和一个托管程序集 - 是否需要任何特殊的 Azure 配置来允许加载 native DLL? (该库确实支持 xcopy 部署,我让它在其他托管环境中以这种方式工作)。

最佳答案

据我所知,您需要使用 Azure Web 角色,而不是 Azure 网站。这些网站不支持完全信任运行。

http://blogs.msdn.com/b/silverlining/archive/2012/06/27/windows-azure-websites-web-roles-and-vms-when-to-use-which.aspx

EvoPdf 有一个适用于 Azure 的示例项目,您可以下载该项目,该项目演示了如何使用可以运行 EvoPdf dll 的站点设置 Web 角色。

关于azure - EvoPDF 库在 Windows Azure 托管站点上失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12460500/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com