asp报告 - document.getElementById(" ReportViewerID")返回null [英] asp reporting - document.getElementById("ReportViewerID") returns null

查看:84
本文介绍了asp报告 - document.getElementById(" ReportViewerID")返回null的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法在IIS7上运行时在ASP.NET网页上呈现ReportViewer。虽然我在使用Visual Studio 2008在调试模式下运行时查看报告没有问题。

我遇到以下javascript错误:

document.getElementById(... ).Controller'是null或不是对象

请注意:
1)我的网页中没有Ajax控件,因此控制名称被更改或者某些内容......
2)我在添加托管处理程序对话框中添加了以下内容:
请求路径: Reserved.ReportViewerWebControl.axd
类型: Microsoft.Reporting.WebForms.HttpHandler
名称:保留 - ReportViewerWebControl-axd

3)我们已将安全性从itegrated更改为在国际空间站上课,工作正常...

然后重新运行我的IIS  问题 不再存在......

我是,因此确认它为什么在经典模式下工作而不在集成模式下工作?!?
有什么建议吗?!?

问候,
Khamisos

I am Unable to render ReportViewer on ASP.NET Web pages while running on IIS7. While I have no problem viewing your reports when running on debug mode with your Visual Studio 2008.

I encounter the following javascript error:

document.getElementById(...).Controller' is null or not an object

note that:
1) I have no Ajax control in my web page, so that the contro l name is changed or something...
2) I have added at the Add Managed Handler dialog the following :
Request path: Reserved.ReportViewerWebControl.axd
Type: Microsoft.Reporting.WebForms.HttpHandler
Name: Reserved-ReportViewerWebControl-axd

3) we have changed the security from itegrated to classis at the ISS and it worked fine...

and then rerun my IIS and the problem doesn't exists any more...

I am so confuesed why it does work on classic mode and not at the integrated mode?!?
any suggestion please?!?

Regards,
Khamisos

推荐答案

我  ;认为您看到的错误是因为web.config中缺少HttpHandler条目。确保在< system.webServer>中有一个ReportViewer HttpHandler条目。 web.config的一节,这部分是IIS7特有的。我知道条目应该是这样的:

< system.webServer>
   < handlers>
      < 添加 名称 = " ReportViewerWebControlHandler " 动词 = " * " path = " Reserved.ReportViewerWebControl .axd " preCondition = " integratedMode " type = " Microsoft.Reporting .WebForms.HttpHandler,Microsoft.ReportViewer.WebForms,Version = 9.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a " />
  < / handlers>
< /system.webServer>


I think the error that you are seeing is because there is a missing HttpHandler entry in the web.config. Make sure you have a entry for the ReportViewer HttpHandler in the <system.webServer> section of the web.config, this section is specifc to IIS7. I beliieve the entry should look something like this:

<system.webServer>
   <handlers>
      <add name="ReportViewerWebControlHandler" verb="*" path="Reserved.ReportViewerWebControl.axd" preCondition="integratedMode" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
   </handlers>
</system.webServer>



这篇关于asp报告 - document.getElementById(&quot; ReportViewerID&quot;)返回null的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆