System.Drawing is not supported on this platform on Azure Function

眉间皱痕 提交于 2019-12-13 13:31:18

问题


I have read the following answer.

It states that App Service sandboxing has some restrictions

Win32k.sys (User32/GDI32) Restrictions

For the sake of radical attack surface area reduction, the sandbox prevents almost all of the Win32k.sys APIs from being called, which practically means that most of User32/GDI32 system calls are blocked. For most applications this is not an issue since most Azure Web Apps do not require access to Windows UI functionality (they are web applications after all).

However I have some image resizing logic (using the EPplus excel library) that works in a normal asp.net core controller but fails in an Azure function (hosted in the exact same app service plan running on the Basic tier) with the message:

System.Drawing is not supported on this platform on Azure Function

Is there any other additional restriction unrelated to the Web App Sandbox. eg nuances between wep apps and azure function apps.

We wanted to use Azure Function to generate all our excel reports however this seems impossible now. Is there any other options? I even tried Amazon Lambda but I ran into this issue: https://github.com/JanKallman/EPPlus/issues/83

来源:https://stackoverflow.com/questions/52807034/system-drawing-is-not-supported-on-this-platform-on-azure-function

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!