将 .rdlc 部署到服务器时出现问题。 (即带有本地报告的 ReportViewer)

发布于 2024-08-05 15:46:36 字数 1006 浏览 6 评论 0原文

我想发布我的 Web 应用程序并使用 Microsoft ReportViewer 查看报告。一切都在本地运行,但在发布时我遇到了许多令人不安的错误。最后我似乎遇到了一个我无法修复的问题。

到目前为止,我已经解决了前 3 个问题...

  1. 安装 Miscrosoft Report 查看器可再发行 2008
    包在我的服务器上。
  2. 将我的“rdlc”文件更改为“内容”并删除了 rdlc web.config 中的 buildProvider 文件。
  3. 在 IIS 中为 ReportViewer 配置托管处理程序

最后,ReportViewer 至少是可见的,并且它“似乎”正在尝试加载报表。但现在我收到以下错误:

[InvalidCastException:无法转换 类型的对象 'Microsoft.Reporting.WebForms.ReportHierarchy' 键入 'Microsoft.Reporting.WebForms.ReportHierarchy'。] Microsoft.Reporting.WebForms.ReportDataOperation..ctor() +253 Microsoft.Reporting.WebForms.HttpHandler.GetHandler() +669 Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext 上下文)+13
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181 System.Web.HttpApplication.ExecuteStep(IExecutionStep 步骤,布尔值&同步完成) +75

哦,太棒了!当然,您不能将对象强制转换为它已经存在的类型!!!!有人知道如何解决这个问题吗?

谢谢,
贾斯汀

I would like to Publish my web application and view a report with the Microsoft ReportViewer. Everything works locally but when published I've encountered a troubling number of errors. Finally I seem to have come across one that I cannot fix.

So far I have solved the first 3 problems by...

  1. Installing the Miscrosoft Report
    Viewer Redistributable 2008
    package on my server.
  2. Changed my "rdlc" file to be "Content" and removed the rdlc
    buildProvider in the web.config
    file.
  3. Configured the Managed Handler in IIS for the ReportViewer

Finally, the ReportViewer is at least visible and it "seems" to be trying to load the report. BUT Now I'm getting the following error:

[InvalidCastException: Unable to cast
object of type
'Microsoft.Reporting.WebForms.ReportHierarchy'
to type
'Microsoft.Reporting.WebForms.ReportHierarchy'.]
Microsoft.Reporting.WebForms.ReportDataOperation..ctor()
+253 Microsoft.Reporting.WebForms.HttpHandler.GetHandler()
+669 Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext
context) +13
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
+181 System.Web.HttpApplication.ExecuteStep(IExecutionStep
step, Boolean& completedSynchronously)
+75

Oh great! Of course you can't cast an object to the type that it already is!!!! Does anybody know how to fix this one?

Thanks,
Justin

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

意中人 2024-08-12 15:46:36

事实证明,当我执行步骤 3 时。
“在 IIS 中为 ReportViewer 配置托管处理程序”

我注册了错误的处理程序。该系统有 v8.0 和 v9.0。选错的概率是 50-50,我赢了。

让这成为那些认为对话框不需要调整大小的人的一个教训......他们总是应该这样你才能看到内容。版本号在下拉列表中不可见,您眼前看到的是 2 个相同的条目!

无论如何...如果您遇到此问题,请检查 Visual Studio 中的版本是否与报表服务器计算机上的托管处理程序相匹配。

Well turns out when I did step 3.
"Configured the Managed Handler in IIS for the ReportViewer"

I registered the wrong one. The system had a v8.0 and a v9.0. 50-50 odds of picking the wrong one and I won.

Let this be a lesson to people who think dialog boxes don't need to be resizable... THEY ALWAYS SHOULD so you can see the content. The version number is not visible in the dropdown you are staring at 2 identical entries to the eye!!!

Anyways... if you encounter this problem check that you're version in Visual Studio matches your Managed Handler on the report server machine.

享受孤独 2024-08-12 15:46:36

如果您没有将 Visual Studio 升级到 SP1,则需要按照 此 MSDN 线程。

If you don't have Visual Studio upgraded to SP1, you need to upgrade as per this MSDN thread.

℡Ms空城旧梦 2024-08-12 15:46:36

您的服务器上安装了.Net 3.5 SP1吗?

Do you have .Net 3.5 SP1 installed on the server?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文