1
I put what he asks on the web.config.
Web.Config:
<system.web>
<globalization culture="pt-BR" uiCulture="pt-BR" />
<compilation debug="true" targetFramework="4.5">
<buildProviders>
<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
</buildProviders>
<assemblies>
<add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
</assemblies>
</compilation>
<httpRuntime targetFramework="4.5" />
<authentication mode="Windows" />
<customErrors mode="RemoteOnly">
<error statusCode="401" redirect="/CustomErrors/401.htm" />
<error statusCode="404" redirect="/CustomErrors/404.htm" />
</customErrors>
<httpHandlers>
<add verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</httpHandlers>
</system.web>
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=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<remove name="ReportViewerWebControlHandler" />
</handlers>
</system.webServer>
Gives the following message:
Report Viewer Configuration Error
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=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
to the system.web/httpHandlers section of the web.config file, or add
<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" />
to the system.webServer/handlers section for Internet Information Services 7 or later.
How to fix this?
You’re wrong about that
web.config
. The instruction is 1) or put the setting in theweb.config
from project to instruction, withinsystem.web/httpHandlers
if IIS 6 or less, or 2) set the configuration tosystem.webServer/handlers
if it’s IIS 7 or higher. Not both. I’ll change the answer for you.– Leonel Sanches da Silva