【问题标题】:Report Viewer DLL loading issue in Azure functionAzure 函数中的报告查看器 DLL 加载问题
【发布时间】:2018-01-03 05:01:07
【问题描述】:

我已添加以下 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' 或其依赖项之一。系统找不到指定的文件。”

【问题讨论】:

    标签: function azure reportviewer


    【解决方案1】:

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

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

    您的 ReportViewer 程序集似乎在本地可用。所以,你可以参考以下建议:

    首先,确保您的 Azure 功能在应用服务计划上运行。

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

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

    更多详情可以参考article

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-02-09
      • 1970-01-01
      • 2023-03-23
      • 1970-01-01
      • 2014-05-01
      相关资源
      最近更新 更多