Report Viewer Configuration error - In View Source of webpage

给你一囗甜甜゛ 提交于 2019-12-01 02:56:11
Darrell Robert Parker

The following was my solution:

<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>
<system.webServer>
  <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"/>
  </handlers>
</system.webServer>

I just checked in an app that includes a ReportViewer control and which has been in production without any issues for almost a year, and the same content is found in the HTML content.

So given the fact that this div is not displayed (CSS attribute display:none), one can guess that it's an error message which is present just for ease of display should the error actually occur. If the error involves something client-side, then it's much easier to implement it that way: all the client-side script has to do to display the message is change the style attribute--there's no need to manipulate the DOM to append the error message, and no need to get the localized error message in the adequate language in javascript (given the localization support of ReportViewer through language packs, there's a different version of this error message per language--much easier to handle this on the ASP.NET side alongside all the other localized content than in the browser in javascript). Yes, I am doing psychology here! :)

nunespascal

To be safe add configuration of IIS6 and IIS7.

IIS6:

<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>

IIS7:

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

This is how my declaration of report viewer control looks like in web.config. Make you sure you have something similar in there. And add if you don't have it. The version of the control might not be the same tho.

<configuration>
    ...
    </system.web>
        ...
        <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>
    ...
</configuration>

For IIS 7 use the following code in your web.config

      <system.webServer>
            <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" />
            </handlers>
      </system.webServer>

I was also facing same problem of report viewer not displaying. After setting display property from browser i got my error as "Report Viewer Configuration error".

I have found that for some parameter i am sending incorrect values i.e. "string .empty". I changed my code to send some value or null to parameter. Now my report is displaying properly. I have resolved my issue by sending correct report parameter values to report. Don't miss any parameter to assign proper values or null.

The following code are as follows

<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=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>
</handlers>

caygun

After changing the web.config file depending on IIS version, try add this code part:

  if(!IsPostBack){
        // Here codes about ReportViewer1 
    }

You can check this similar problem.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!