Error while running Reportviewer

Asked

Viewed 1,689 times

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 the web.config from project to instruction, within system.web/httpHandlers if IIS 6 or less, or 2) set the configuration to system.webServer/handlers if it’s IIS 7 or higher. Not both. I’ll change the answer for you.

1 answer

2


Well, the mistake is quite clear and tells you exactly what to do. Basically, it’s putting the following in your web.config:

<configuration>
  ...
  <system.web>
    ...
    <httpHandlers>
      <add verb="*" path="Reserved.ReportViewerWebControl.axd" type = "Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
      ...
    </httpHandlers>
    ...
  </system.web>
  ...
</configuration>

EDIT

The error is here:

  <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" />
      <!-- Retire a declaração abaixo -->
      <!-- remove name="ReportViewerWebControlHandler" /-->
    </handlers>
  </system.webServer>
  • So @Ciganomorrisonmendez I put and still continues. and now ?

  • Edit your question and ask the web.config in it. Could be error in file formatting.

  • I found the error when I pasted webconfig here. rs.. I removed this <remove name="Reportviewerwebcontrolhandler" /> and it worked.

  • @Andreeh Yes, I’ll change to get the answer right.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.