Search code examples
asp.netreporting-servicesweb-config

How to resolve "The Report Viewer Web Control HTTP Handler has not been registered in the application's web.config file"


When working with an ASP.NET application, you receive the following error when attempting to view a page with the Microsoft ReportViewer control:

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

Solution

  • The solution has two steps.

    Find the "system.webServer" section of the web.config and add the following lines to the "handlers" section. If your web.config doesn't have a "handlers" section, add it along with the new lines:

    <system.webServer>
        <handlers>
            <!-- Add these lines -->
            <add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
            <validation validateIntegratedModeConfiguration="false"/>
        </handlers>
    </system.webServer>
    

    Then, Find the "system.web" section of the web.config and add the following lines to the "httpHandlers" section.

      <system.web>
        <httpHandlers>
          <!-- Add this line -->
          <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>