简体   繁体   English

Azure充当Web角色

[英]Azure function as a web role

I have a web role cloud service that generates a PDF file from an HTML file. 我有一个Web角色云服务,可从HTML文件生成PDF文件。 I have to use a web role as otherwise Azure does not let my process to have enough access for PDF generation. 我必须使用Web角色,否则Azure不允许我的进程具有足够的访问权限来生成PDF。 Now I want to migrate that service to an azure function. 现在,我想将该服务迁移到azure函数。 Is there a way to have an azure function with the same access level as a web role ? 有没有办法让Azure功能具有与Web角色相同的访问级别?

Azure Functions run in the same sandbox as a Web App, so no, you will not be able to install your PDF software there (same limitations). Azure Functions与Web App在同一沙箱中运行,因此,不能,您将无法在其中安装PDF软件(相同的限制)。

You'd be able to migrate anything that doesn't require low-level installation, and leave your PDF generation within your web/worker role (or a VM). 您将能够迁移不需要低级安装的任何内容,并将PDF生成保留在Web /工作人员角色(或VM)中。

As Azure Web App sandbox states as follows: 由于Azure Web App沙箱状态如下:

The following PDF generators are supported: 支持以下PDF生成器:

Note: Just make sure you are using the Basic or higher App Service Plan. 注意:只需确保您使用的是基本或更高版本的应用服务计划。 Moreover, here is a tutorial about Azure App Services - Using Azure App Services to Convert a Web Page to PDF , you could refer to it. 此外,这是有关Azure App Services的教程-使用Azure App Services将网页转换为PDF ,您可以参考它。

UPDATE: 更新:

For EVOPDF , the vendor developed a solution consisting in a service that you can deploy as a separate Azure Worker Role and a client library that you can link directly into your Azure Website to call that service completely transparent for you. 对于EVOPDF ,供应商开发了一个解决方案,其中包含一项服务,您可以将其部署为单独的Azure Worker角色,以及一个客户端库,可以将其直接链接到Azure网站中,以使该服务对您完全透明。 For directly using EVOPDF in Azure Web App, it is impossible. 要在Azure Web App中直接使用EVOPDF,这是不可能的。 Here is a similar issue, you could refer to it . 这是一个类似的问题,您可以参考

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM