gpt4 book ai didi

iis - 无需安装 Microsoft Report Viewer 即可发布网站

转载 作者:行者123 更新时间:2023-12-03 14:38:10 26 4
gpt4 key购买 nike

我有一个只能通过 ftp 访问的 Web 服务器,但我无法在其上安装 Microsoft Report Viewer。

如何将我的 asp.net 应用程序发布到 IIS 无需安装 ReportViewer ?

我已将以下 dll 复制到我的站点 bin 文件夹中:

  • Microsoft.ReportViewer.WebForms.dll
  • Microsoft.ReportViewer.Common.dll

  • 现在我收到错误消息:

    An error occurred during local report processing.
    The definition of the report 'Reports\QuotationViewReport.rdlc' is invalid.
    An unexpected error occurred in Report Processing.
    Could not load file or assembly 'Microsoft.ReportViewer.ProcessingObjectModel, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.



    我什至找不到名为 Microsoft.ReportViewer.ProcessingObjectModel.dll 的 dll在我的本地机器上。

    是否可以在不安装 ReportViewer 的情况下发布我的应用程序?

    最佳答案

    先决条件:在您的开发机器上安装 Microsoft ReportViewer 程序集(如 answered by webkite)。

    在 Visual Studio 中,来自 Add Reference项目的操作,选择浏览选项卡并浏览到 GAC。
    ( C:\Windows\assembly\GAC_MSIL )。

    在那里,找到 Microsoft.ReportViewer.ProcessingObjectModel程序集文件夹,选择适合您需要的版本子文件夹,并将程序集添加为本地引用。

    然后在您的引用列表中找到该程序集,并切换其 Local Copy属性(property)到true .

    对于其他报表查看器程序集,您应该能够直接从 Add Reference 中的 .Net 选项卡添加它们。对话框。不要忘记切换Local Copy属性(property)到true对他们也是。

    通过此设置,ReportViewer 程序集将在每次构建时复制到您的构建目录,您应该能够轻松地将它们复制到您的目标部署环境。

    您可以尝试使用一些 ReportViewer 包,而不是在 NuGet 上找到的包。 .但它们似乎都不是由微软官方提供的。

    关于iis - 无需安装 Microsoft Report Viewer 即可发布网站,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7165384/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com