Eu coloquei o que ele pede no 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>
Dá a seguinte mensagem:
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.
Como arrumar isso?
web.config
. A instrução é 1) ou colocar a configuração noweb.config
do projeto a instrução, dentro desystem.web/httpHandlers
se for IIS 6 ou inferior, ou 2) colocar a configuração emsystem.webServer/handlers
se for IIS 7 ou superior. Não ambas. Vou alterar a resposta pra você.