EvoPDF库在Windows Azure托管站点上失败 [英] EvoPDF library fails on Windows Azure hosted site

查看:235
本文介绍了EvoPDF库在Windows Azure托管站点上失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

EvoPDF HTML到PDF转换库(http://www.evopdf.com/)声称它支持Windows Azure云平台,但是我无法使其正常工作.我得到了例外:

The EvoPDF HTML to PDF conversion library (http://www.evopdf.com/) claims it supports the Windows Azure Cloud platform, however I can't get it to work. I get the 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请求?

This looks like its failing at the point where the library fetches the HTML content via a web request. Is there anything in Azure which prevents outgoing web requests?

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

The library is deployed as two DLLs, a native DLL and a managed assembly - is there any special Azure configuration required to allow native DLLs to be loaded? (The library does support xcopy deployment, I have it working this way in other hosting environments).

推荐答案

据我所知,您需要使用Azure Web Role,而不是Azure网站.这些网站不支持以完全信任的方式运行.

From what I can see you need to use and Azure Web Role and not an Azure Web Site. The sites doesn't support running with Full trust.

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

EvoPdf have an example project for Azure that you can download that shows how to setup up a Web Role with a site that can run the EvoPdf dll.

这篇关于EvoPDF库在Windows Azure托管站点上失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆