2
votes

The Error:

The Report Viewer Web Control HTTP Handler has not been registered in the application's web.config file. Add to the system.web/httpHandlers section of the web.config file, or add to the system.webServer/handlers section for Internet Information Services 7 or later.

The Web config file :

<system.web>
    <authentication mode="None" />
    <compilation debug="true" targetFramework="4.5.2" />
    <httpRuntime targetFramework="4.5.2" />
    <httpHandlers>
      <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" validate="false" />
    </httpHandlers>
</system.web>
<system.webServer>
    <modules>
      <remove name="FormsAuthentication" />
    </modules>
   <validation validateIntegratedModeConfiguration="false" />
   <handlers>
    <remove name="ReportViewerWebControlHandler"/>
      <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>

The config entries do exists, but the error is still thrown.

1

1 Answers

-1
votes

Just add this code in web.config
You should ensure your version of Microsoft.Reporting.WebForms (Version=12.0.0.0)

find this section

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=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" /* /handlers /system.webServer

system.web compilation debug="true" assemblies add assembly="Microsoft.Build.Framework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" / add assembly="System.Management, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" / 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.Xml.Linq, 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="Microsoft.ReportViewer.WebForms, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" / add assembly="Microsoft.ReportViewer.Common, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" / /assemblies