function - Azure 函数中的报告查看器 DLL 加载问题

标签 function azure reportviewer

我添加了以下 DLL 并将本地复制设置为 true

Microsoft.ReportViewer.Common.dll 10.0.0.0

Microsoft.ReportViewer.WebForms.dll 10.0.0.0

Microsoft.ReportViewer.ProcessingObjectModel.dll 10.0.0.0

当我浏览应用程序文件夹并抛出 Azure Kudu 时,我可以在 bin 文件夹中看到上面的 DLL。

我总是在生产中遇到此错误,但它在本地运行良好。

“Microsoft.ReportViewer.Common,Version=10.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a”或其依赖项之一。系统找不到指定的文件。”

最佳答案

当您在本地托管 ASP.NET 应用程序时,ReportViewer 程序集通常在 Visual Studio 安装期间直接安装在 IIS 服务器的全局程序集缓存 (GAC) 中,并且可以由应用程序直接访问。但是,当您在云中托管 ASP.NET 应用程序时,Microsoft Azure 不允许将任何内容安装到 GAC 中。

I am always getting this error in the production but It works well locally.

您的 ReportViewer 程序集似乎在本地可用。因此,您可以引用以下建议:

首先,确保您的 Azure 函数正在应用服务计划上运行。

其次,下载 Microsoft Report Viewer 2012 Runtime 可再发行软件包。

然后,在项目中创建文件夹并将关联的资源程序集文件复制到其中,并将属性“复制到输出目录”设置为“始终复制”

更多详情,您可以引用article .

关于function - Azure 函数中的报告查看器 DLL 加载问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48071431/

相关文章:

function - 如何为函数/过程创建别名?

arrays - 在 VBA 中,如何将字符串拆分为数组,然后将其作为参数传递给 Sub 或 Function

azure - 在 Azure 管道中;在哪里存储数组?

c# - 在winform的ReportViewer的LocalReport中导出为CSV

c - C中标识符函数位置问题

Javascript (mongojs) : Return a value in a function

azure - 如何使用 PowerShell 或 Azure CLI 检索 Azure 存储表中的所有记录

azure - : getting unauthorize error while trying to create load balancer

vb.net - WinForms ReportViewer : slow initial rendering

reportviewer - 如何将图像 Logo 动态添加到 ReportViewer 参数?