报表查看器Web控件HTTP处理程序尚未在应用程序的Web中注册。配置文件

时间:2022-01-21 08:21:12
    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

This error is coming . I have already mentioned this line in http handler but still getting this error

这个错误来了。我已经在http处理程序中提到过这一行,但仍然得到这个错误

<add path="Reserved.ReportViewerWebControl.axd" verb="*"   type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=8.0.0.0,    Culture=neutral, PublicKeyToken=0000000000000000" validate="false" />

my html page markup is as follow

我的html页面标记如下

<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:Button ID="btnsubmit" runat="server" OnClick="GenerateReportButton_Click" />
    <rsweb:ReportViewer ID="ReportViewer1" runat="server">
    </rsweb:ReportViewer>
</asp:Content>

Web config assemblies section is as follows :

Web配置程序集部分如下:

<assemblies>
    <add assembly="System.Core, 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.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    <add assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    <add assembly="System.Windows.Forms, Version=2.0.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>

10 个解决方案

#1


10  

I was having the very same problem. What happened was I put the Report loading routine on Page_Load, and didn't wrap it in if (!IsPostBack). The ReportViewer makes a POST to the page, and that was triggering Page_Load and reloading the report, somehow messing it up. After putting everything inside if (!IsPostBack), it worked like a charm.

我也有同样的问题。发生的事情是我将报表加载例程放在Page_Load上,并没有将它封装在if (!IsPostBack)中。ReportViewer在页面上做了一个POST,它触发了Page_Load并重新加载了报告,以某种方式将其打乱。把所有的东西都放进if (!IsPostBack)之后,它就像一个魔咒。

#2


9  

Could you check your web.config for handlers registered or not for ReportViewer. its should be like this

你能检查一下你的网络吗?为已注册或未注册的ReportViewer配置。它应该是这样的。

Handler

处理程序

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

Also check assembly section in your web.config for ReportViewer, it should be like below.

还要检查web中的汇编部分。ReportViewer的配置应该如下。

<assemblies>
<add assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
   <add assembly="Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />

#3


4  

The issue also went away for me when I changed the app pool from Integrated to Classic.

当我将应用程序池从集成改为经典的时候,这个问题也消失了。

#4


1  

This issue arose for me after I changed the parameter of the stored procedure my query was calling without refreshing the dataset in the SSRS designer, so you could try this.

当我更改查询正在调用的存储过程的参数而没有刷新SSRS设计器中的数据集时,就出现了这个问题,所以您可以尝试一下。

#5


1  

The last two days I have had the same issue. This is not really an answer to the original question - just some additional information for those having the same problem.

过去两天我遇到了同样的问题。这并不是对最初问题的回答——只是对那些有同样问题的人提供一些额外的信息。

The application I had the problem with has been developed in 2005 and is under development still.

我所遇到的问题是在2005年开发的,目前正在开发中。

So it has been ported from VS 2005 to VS 2008 to VS 2010 and lately to VS 2013. It seems this is when the error happened. Somewhere in between the .NET framework has switched from .NET 3.5 to .NET 4.

从2005年到2008年到2010年,最近到2013年。似乎这就是错误发生的时候。在。net框架之间的某个地方已经从。net 3.5切换到。net 4。

I think (I did not verify) that with .NET 4 the report viewer *.dlls come as system libraries. Anyway this showed my GAC to me:

我认为(我没有验证)。net 4的报表查看器*。dll以系统库的形式出现。总之,这让我明白了GAC

报表查看器Web控件HTTP处理程序尚未在应用程序的Web中注册。配置文件

Only the first one, version 8, has been manually installed by myself (with the Reporting Viewer 2005 redistributable binary).

只有第一个版本8是我自己手工安装的(使用Reporting Viewer 2005可重分发二进制文件)。

So in VS 2013, Resharper is thinking of version 11 and automatically changes those lines in web.config

所以在VS 2013年,Resharper考虑了版本11,并且自动地在web.config中修改这些行

<httpHandlers>
  <!-- this is the correct one (if using Report Viewer 2005 / 8.0.0.0 -->
  <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false"/>
</httpHandlers>

<httpHandlers>
  <!-- this is the wrong one inserted during the update (or maybe Resharper) -->

  <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="System.ServiceModel.Activation.HttpHandler, System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
</httpHandlers>

So long story short: It seems - at least in my case - this error points to a version conflict with the libraries used with visual studio and those used an runtime. The error given from Microsoft is a little bit misleading.

长话短说:至少在我看来,这个错误指向了与visual studio使用的库和运行时库之间的版本冲突。来自微软的错误有点误导人。

#6


0  

I have not changed anything in the app pool just added this line:

我没有修改app pool中的任何内容,只添加了这一行:

<Add name = "Reserved-ReportViewerWebControl-axd" path = "Reserved.ReportViewerWebControl.axd" verb = "*" type = "Microsoft.Reporting.WebForms.HttpHandler" resourceType = "Unspecified" />

#7


0  

We were getting this exact same error from the Report Viewer web control when we upgraded to SSRS 2016. But we also could not access the SSRS Web Portal - we were getting a 503 error which led us here: https://support.microsoft.com/en-gb/help/3171040/-http-503-service-unavailable-error-when-you-open-the-ssrs-web-portal-after-you-upgrade-to-ssrs-2016

当我们升级到SSRS 2016时,报表查看器web控件也出现了同样的错误。但我们也无法访问SSRS Web门户——我们在这里遇到了503个错误:https://support.microsoft.com/en-gb/help/3171040/-http-503-service-unavailable- when- open- SSRS - Web port -after-you- upgradeto ssr -2016

Once we installed SQL Server 2016 Service Pack 1 everything worked.

一旦我们安装了SQL Server 2016 Service Pack 1,一切正常。

#8


0  

If you're using WCF Services for retrieving data form the database, you might face this issue even if you've added the HTTP handler to your web.config file.

如果您正在使用WCF服务来检索数据库中的数据,那么即使您将HTTP处理程序添加到web,您也可能会遇到这个问题。配置文件。

In this case you also have to add the service endpoints, behaviors and bindings to the web.config to make things work.

在这种情况下,您还必须向web添加服务端点、行为和绑定。配置使之工作。

#9


0  

In my case, following line solved the problem for me :

在我的案例中,以下一行为我解决了问题:

<system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <handlers>
      <add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
    </handlers>
</system.webServer>

#10


0  

For IIS 7 or later

适用于iis7或更高版本

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

#1


10  

I was having the very same problem. What happened was I put the Report loading routine on Page_Load, and didn't wrap it in if (!IsPostBack). The ReportViewer makes a POST to the page, and that was triggering Page_Load and reloading the report, somehow messing it up. After putting everything inside if (!IsPostBack), it worked like a charm.

我也有同样的问题。发生的事情是我将报表加载例程放在Page_Load上,并没有将它封装在if (!IsPostBack)中。ReportViewer在页面上做了一个POST,它触发了Page_Load并重新加载了报告,以某种方式将其打乱。把所有的东西都放进if (!IsPostBack)之后,它就像一个魔咒。

#2


9  

Could you check your web.config for handlers registered or not for ReportViewer. its should be like this

你能检查一下你的网络吗?为已注册或未注册的ReportViewer配置。它应该是这样的。

Handler

处理程序

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

Also check assembly section in your web.config for ReportViewer, it should be like below.

还要检查web中的汇编部分。ReportViewer的配置应该如下。

<assemblies>
<add assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
   <add assembly="Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />

#3


4  

The issue also went away for me when I changed the app pool from Integrated to Classic.

当我将应用程序池从集成改为经典的时候,这个问题也消失了。

#4


1  

This issue arose for me after I changed the parameter of the stored procedure my query was calling without refreshing the dataset in the SSRS designer, so you could try this.

当我更改查询正在调用的存储过程的参数而没有刷新SSRS设计器中的数据集时,就出现了这个问题,所以您可以尝试一下。

#5


1  

The last two days I have had the same issue. This is not really an answer to the original question - just some additional information for those having the same problem.

过去两天我遇到了同样的问题。这并不是对最初问题的回答——只是对那些有同样问题的人提供一些额外的信息。

The application I had the problem with has been developed in 2005 and is under development still.

我所遇到的问题是在2005年开发的,目前正在开发中。

So it has been ported from VS 2005 to VS 2008 to VS 2010 and lately to VS 2013. It seems this is when the error happened. Somewhere in between the .NET framework has switched from .NET 3.5 to .NET 4.

从2005年到2008年到2010年,最近到2013年。似乎这就是错误发生的时候。在。net框架之间的某个地方已经从。net 3.5切换到。net 4。

I think (I did not verify) that with .NET 4 the report viewer *.dlls come as system libraries. Anyway this showed my GAC to me:

我认为(我没有验证)。net 4的报表查看器*。dll以系统库的形式出现。总之,这让我明白了GAC

报表查看器Web控件HTTP处理程序尚未在应用程序的Web中注册。配置文件

Only the first one, version 8, has been manually installed by myself (with the Reporting Viewer 2005 redistributable binary).

只有第一个版本8是我自己手工安装的(使用Reporting Viewer 2005可重分发二进制文件)。

So in VS 2013, Resharper is thinking of version 11 and automatically changes those lines in web.config

所以在VS 2013年,Resharper考虑了版本11,并且自动地在web.config中修改这些行

<httpHandlers>
  <!-- this is the correct one (if using Report Viewer 2005 / 8.0.0.0 -->
  <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false"/>
</httpHandlers>

<httpHandlers>
  <!-- this is the wrong one inserted during the update (or maybe Resharper) -->

  <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="System.ServiceModel.Activation.HttpHandler, System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
</httpHandlers>

So long story short: It seems - at least in my case - this error points to a version conflict with the libraries used with visual studio and those used an runtime. The error given from Microsoft is a little bit misleading.

长话短说:至少在我看来,这个错误指向了与visual studio使用的库和运行时库之间的版本冲突。来自微软的错误有点误导人。

#6


0  

I have not changed anything in the app pool just added this line:

我没有修改app pool中的任何内容,只添加了这一行:

<Add name = "Reserved-ReportViewerWebControl-axd" path = "Reserved.ReportViewerWebControl.axd" verb = "*" type = "Microsoft.Reporting.WebForms.HttpHandler" resourceType = "Unspecified" />

#7


0  

We were getting this exact same error from the Report Viewer web control when we upgraded to SSRS 2016. But we also could not access the SSRS Web Portal - we were getting a 503 error which led us here: https://support.microsoft.com/en-gb/help/3171040/-http-503-service-unavailable-error-when-you-open-the-ssrs-web-portal-after-you-upgrade-to-ssrs-2016

当我们升级到SSRS 2016时,报表查看器web控件也出现了同样的错误。但我们也无法访问SSRS Web门户——我们在这里遇到了503个错误:https://support.microsoft.com/en-gb/help/3171040/-http-503-service-unavailable- when- open- SSRS - Web port -after-you- upgradeto ssr -2016

Once we installed SQL Server 2016 Service Pack 1 everything worked.

一旦我们安装了SQL Server 2016 Service Pack 1,一切正常。

#8


0  

If you're using WCF Services for retrieving data form the database, you might face this issue even if you've added the HTTP handler to your web.config file.

如果您正在使用WCF服务来检索数据库中的数据,那么即使您将HTTP处理程序添加到web,您也可能会遇到这个问题。配置文件。

In this case you also have to add the service endpoints, behaviors and bindings to the web.config to make things work.

在这种情况下,您还必须向web添加服务端点、行为和绑定。配置使之工作。

#9


0  

In my case, following line solved the problem for me :

在我的案例中,以下一行为我解决了问题:

<system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <handlers>
      <add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
    </handlers>
</system.webServer>

#10


0  

For IIS 7 or later

适用于iis7或更高版本

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