在web.config中指定HTTP处理程序时,Reportviewer HTTP处理程序错误 [英] Reportviewer HTTP handler error when HTTP handler is specified in web.config

查看:72
本文介绍了在web.config中指定HTTP处理程序时,Reportviewer HTTP处理程序错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我获得了VS 2008和reportviewer web控件,可以在我的本地方框上工作。但是,当我将Web应用程序部署到生产服务器(使用.NET 3.5 F / W& NO VS2005)时,我必须构建一个bin目录来保存2个reportviewer DLL(Microsoft.ReportViewer.Common.dll& Microsoft。 ReportViewer.WebForms.dll)现在我遇到了HTTP处理程序错误(即使我的web.config有Http Handler)。

异常消息: 报表查看器Web控件HTTP处理程序尚未在应用程序的Web中注册。配置文件。添加< add verb =" *"路径= QUOT; Reserved.ReportViewerWebControl.axd" type =" Microsoft.Reporting.WebForms.HttpHandler,Microsoft.ReportViewer.WebForms,Version = 9.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a" />到web.config文件的system.web / httpHandlers部分。

从Web.config中提取:

< ;&的System.Web GT;
< httpHandlers>

 < remove verb =" *"路径= QUOT * ASMX"。 />
< add verb =" *"路径= QUOT * ASMX"。验证= QUOT假QUOT; type =" System.Web.Script.Services.ScriptHandlerFactory,System.Web.Extensions,Version = 3.5.0.0,Culture = neutral,PublicKeyToken = 31BF3856AD364E35" />
< add verb =" *"路径= QUOT * _ AppService.axd"验证= QUOT假QUOT; type =" System.Web.Script.Services.ScriptHandlerFactory,System.Web.Extensions,Version = 3.5.0.0,Culture = neutral,PublicKeyToken = 31BF3856AD364E35" />
< add verb =" GET,HEAD"路径= QUOT;&的ScriptResource.axd QUOT; type =" System.Web.Handlers.ScriptResourceHandler,System.Web.Extensions,Version = 3.5.0.0,Culture = neutral,PublicKeyToken = 31BF3856AD364E35"验证= QUOT假QUOT; />
< add path =" Reserved.ReportViewerWebControl.axd"动词= QUOT * QUOT; type =" Microsoft.Reporting.WebForms.HttpHandler,Microsoft.ReportViewer.WebForms,Version = 9.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a"验证= QUOT假QUOT; />

< / HttpHandlers的>


<组件>
< add assembly =" System.Core,Version = 3.5.0.0,Culture = neutral,PublicKeyToken = B77A5C561934E089" /> < add assembly =" System.Data.DataSetExtensions,Version = 3.5.0.0,Culture = neutral,PublicKeyToken = B77A5C561934E089" /> < add assembly =" System.Web.Extensions,Version = 3.5.0.0,Culture = neutral,PublicKeyToken = 31BF3856AD364E35" /> < add assembly =" System.Xml.Linq,Version = 3.5.0.0,Culture = neutral,PublicKeyToken = B77A5C561934E089" /> < add assembly =" Microsoft.ReportViewer.WebForms,Version = 9.0.0.0,Culture = neutral,PublicKeyToken = B03F5F7F11D50A3A" /> < add assembly =" Microsoft.ReportViewer.Common,Version = 9.0.0.0,Culture = neutral,PublicKeyToken = B03F5F7F11D50A3A" />
< /组件>


< buildProviders>
< add extension =" .rdlc" type =" Microsoft.Reporting.RdlBuildProvider,Microsoft.ReportViewer.Common,Version = 9.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a" /> < / buildProviders>
< /system.web>

你可以投入的任何光线都将非常感激。

谢谢&问候语<...>

解决方案

听起来您已将报表查看器程序集复制到生产计算机上而不是使用可再发行组件。 请注意,您还缺少Microsoft.ReportViewer.ProcessingObjectModel.dll。 您是否尝试过安装可再发行组件?  ReportViewer.exe随VS一起安装,可以自由重新分发。 最新版本也可在此处获得: http://www.microsoft的.com /下载/ details.aspx?FAMILYID = 6aaa74bd-a46e-4478-b4e1-2063d18d2d42


Hi All,

I got VS 2008 and reportviewer web control to work on my local box. However when I deployed the web appl to the production server(with .NET 3.5 F/W & NO VS2005), I had to build a bin directory to keep the 2 reportviewer DLLs (Microsoft.ReportViewer.Common.dll & Microsoft.ReportViewer.WebForms.dll) and now I got stuck with the HTTP handler error(even though my web.config has that Http Handler).

Exception message: The Report Viewer Web Control HTTP Handler has not been registered in the application's web.config file. Add <add verb="*" path="Reserved.ReportViewerWebControl.axd" type = "Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> to the system.web/httpHandlers section of the web.config file.


Extract from Web.config:

<system.web>
<httpHandlers>

 <remove verb="*" path="*.asmx" />
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" />
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler,Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false" />

</httpHandlers>


<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> <add assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /> <add assembly="Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
</assemblies>


<buildProviders>
<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" /> </buildProviders>
</system.web>

Any light you can throw-in will be much appreciated.

Thanks & Regards
Kiran..

解决方案

It sounds like you have copied the report viewer assemblies onto the production machine rather than using the redistributable.  Note that you are also missing Microsoft.ReportViewer.ProcessingObjectModel.dll.  Have you tried installing the redistributable?  ReportViewer.exe is installed with VS and can be freely redistributed.  The most recent version is also available here: http://www.microsoft.com/downloads/details.aspx?familyid=6aaa74bd-a46e-4478-b4e1-2063d18d2d42


这篇关于在web.config中指定HTTP处理程序时,Reportviewer HTTP处理程序错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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