locked
Invisible HttpHandler error using reportViewer RRS feed

  • Question

  • I am trying to use a Version 11.0.0.0 report viewer in Visual Studio 2012.  I have added the report viewer then set the attributes via code.  I suffered of problems getting past errors which I eventually resolved.   See thread http://social.msdn.microsoft.com/Forums/en-US/77a3dcb1-c10f-462c-aedc-2e72bc498fad/the-report-definition-for-report-rptxxx-has-not-been-specified

    However when all of those errors were resolved, then opening page with the report viewer resulted in a blank page.  When the view source was examine then the report viewer was entered as a span with display:none and an error message saying.

    <h2>Report Viewer Configuration Error</h2>
    <p>The Report Viewer Web Control HTTP Handler has not been 
    registered in the application's web.config file. Add &lt;add verb="*" 
    path="Reserved.ReportViewerWebControl.axd" type = "Microsoft.Reporting.WebForms.HttpHandler, 
    Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" /&gt; 
    to the system.web/httpHandlers section of the web.config file, or 
    add &lt;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" /&gt; 
    to the system.webServer/handlers section for Internet Information Services 7 or later.</p>

    This statement is totally untrue.  Both elements are in their proper place in the web.config.

    Additional information.  This was being developed on a development machine using the built-in developmental web server for VS 2012.  I started getting this error when referencing the DLLs from the GAC.  In attempt to rectify this I tried referencing the assemblies from the bin directory (particularly since we will not  be permitted to install the redistributable on the hosting web server).  This made no difference.

    I then tried to develop this in VS 2010 on the same machine with the same report.  I had to change how the report was described in the rdlc by referencing different schemas from MS and removing the ReportSection elements.  Once this was done I got the same error.  However, this time there really were no httphandler elements or handler elements in the web config.  So I added those handlers.  But still I got the same error.  I have two threads on MSDN, one on www.ASP.Net and one on experts exchange dealing with this problem, but the only response I've gotten concerning this error talks about a problem on the web server.  This error is occuring on the development manchine. 

    An MSDN SQL Server Forum moderator once told me once that the people who answer threads don't really examine threads that are more than a certain age, and recommended opening new threads to find out information that hasn't been provided in older threads.  So that is what I am doing.  In addition,  the error in the title of the original threads have been resolved, (though I keep getting posts addressing it) so I figured it would be helpful to have a thread that only concerns the state in which my problem currently exists. 


    Edward R. Joell MCSD MCDBA


    • Edited by joeller Thursday, August 22, 2013 8:06 PM
    Tuesday, August 20, 2013 1:49 PM

Answers

  • It gets stranger. I took the report we created during the MS trouble call which displayed just fine, and added a dataset and some parameters.

    Bam!!! HTTPhandler error! I took out the parameters and every thing displayed just fine except that there were no results because no parameter was applied. There is an issue with how the parameters are being read.

    AND it had nothing to do with the version of the schema!!! I used the 2010/01 schema it it behaved the same way!!! No parameters, view is fine, but no data. Add parameters HTTPHander error.

    Update:

    On this page http://www.gotreportviewer.com/ in the FAQs it says about parameters in reportviewer

    Q: Why doesn't the ReportViewer control support parameter prompting in local mode? A: The ReportViewer control does not prompt for parameters when in local mode. It prompts for parameters when it is connected to a Report Server.

    In local mode it does not make sense for ReportViewer to prompt for parameters. The rationale is as follows: The most common use of report parameters is to pass to queries as values of query parameters. But unlike the Report Server, the ReportViewer control does not execute queries itself. Rather, queries are executed by the host application, and the result is passed to the ReportViewer control. So the ReportViewer control does not have the opportunity to set query parameters. Applications should take advantage of the parameterization features of Visual Studio data wizards instead.

    So I built a report with no parameters. I built a dropdown in the report viewer page to provide a parameter for the query. I used a data adapter to assign a data table to the dataset, and assigned parameter to the command setting the value equal to the selected value of the dropdown. I opened the report and got my results. This was in a report converted from an rdl to an rdlc. I had to go into the xml and remove the query parameters and the query SQL, under the datasources element.


    Edward R. Joell MCSD MCDBA

    • Marked as answer by joeller Wednesday, September 4, 2013 6:09 PM
    • Edited by joeller Wednesday, September 4, 2013 6:09 PM
    Wednesday, September 4, 2013 6:08 PM

All replies

  • I am adding this reply so that this thread will bubble to the top of the open questions list.


    Edward R. Joell MCSD MCDBA

    Thursday, August 22, 2013 8:02 PM
  • So out of frustration due to lack of assistance I started again from scratch.  Brand new project, dropped and dragged report viewer on to page, generated dataset in code added tables[0] Ran  the report in debug and this time got error

    Unhandled exception at line 167, column 5 in http://localhost:63208/Default.aspx
    0x800a1391 - Microsoft JScript runtime error: 'Microsoft' is undefined

    What does this mean???

    Update:  Then at this link  http://www.visualwebgui.com/Developers/Forums/tabid/364/forumid/56/threadid/53545/scope/posts/Default.aspx

    I found that someone had to add  the handlers into the web.config manually when they got this error.  I did so.  And the new report project rendered the same invisible httphandler error as the other web page.

    MORE Update: 

    The report definition file was copied over from an rdl that was converted to an rdlc using the process spelled out in MSDN. The schema definition in the report was

    http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition

    When I changed it to read 2012 then project refused to compile throwing error

    The report definition is not valid or supported by this version of Reporting Services. This could be the result of publishing a report definition of a later version of Reporting Services, or that the report definition contains XML that is not well-formed or the XML is not valid based on the Report Definition schema. Details: The report definition has an invalid target namespace 'http://schemas.microsoft.com/sqlserver/reporting/2012/01/reportdefinition' which cannot be upgraded.

    Any ideas?


    Edward R. Joell MCSD MCDBA



    • Edited by joeller Tuesday, August 27, 2013 7:31 PM More Info
    Tuesday, August 27, 2013 7:04 PM
  • I submitted an MS support ticket.  Working with the report we found that the error had nothing to do with the http handler.  It was due to the fact the schema used by the RDLCs that ReportViewer 11.0.0.0 could read were

    xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition"

    xmlns:rd=http://schemas.microsoft.com/SQLServer/reporting/reportdesigner

    But the schemas used by SSRS RDL

    xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner"

    xmlns:cl="http://schemas.microsoft.com/sqlserver/reporting/2010/01/componentdefinition"

    xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition"

    do not comply with the schemas required by RLDC for MS Reportviewer. The MS person stated that there was no possible means by which the XML in the RDL file could be manually modified to meet the requirements of the 2008/01/reportdefinition schema.

    I find it rather illogical that this should be the case.

    So I am going to attempt to find out how to modify the schema of the RDL to meet the criteria required by ReportViewer 11.0.0.0.


    Edward R. Joell MCSD MCDBA


    • Edited by joeller Friday, August 30, 2013 2:57 PM
    Friday, August 30, 2013 2:47 PM
  • It gets stranger. I took the report we created during the MS trouble call which displayed just fine, and added a dataset and some parameters.

    Bam!!! HTTPhandler error! I took out the parameters and every thing displayed just fine except that there were no results because no parameter was applied. There is an issue with how the parameters are being read.

    AND it had nothing to do with the version of the schema!!! I used the 2010/01 schema it it behaved the same way!!! No parameters, view is fine, but no data. Add parameters HTTPHander error.

    Update:

    On this page http://www.gotreportviewer.com/ in the FAQs it says about parameters in reportviewer

    Q: Why doesn't the ReportViewer control support parameter prompting in local mode? A: The ReportViewer control does not prompt for parameters when in local mode. It prompts for parameters when it is connected to a Report Server.

    In local mode it does not make sense for ReportViewer to prompt for parameters. The rationale is as follows: The most common use of report parameters is to pass to queries as values of query parameters. But unlike the Report Server, the ReportViewer control does not execute queries itself. Rather, queries are executed by the host application, and the result is passed to the ReportViewer control. So the ReportViewer control does not have the opportunity to set query parameters. Applications should take advantage of the parameterization features of Visual Studio data wizards instead.

    So I built a report with no parameters. I built a dropdown in the report viewer page to provide a parameter for the query. I used a data adapter to assign a data table to the dataset, and assigned parameter to the command setting the value equal to the selected value of the dropdown. I opened the report and got my results. This was in a report converted from an rdl to an rdlc. I had to go into the xml and remove the query parameters and the query SQL, under the datasources element.


    Edward R. Joell MCSD MCDBA

    • Marked as answer by joeller Wednesday, September 4, 2013 6:09 PM
    • Edited by joeller Wednesday, September 4, 2013 6:09 PM
    Wednesday, September 4, 2013 6:08 PM
  • I am having this same issue, including the script error

    Unhandled exception 0x800a1391 - Microsoft JScript runtime error: 'Microsoft' is undefined

    The funny thing is that the reports were working fine before.  The only thing I did is some IE debugging through F12 on both the local dev machine and the test server.  Then this started happening.

    Other developers using the exact same project from source control are NOT having the issue, so it seems to be related to the development environment.  The problem is, I don't know how to troubleshoot the issue other than re-installing the OS from scratch AND everything else.

    I'm also getting a couple of errors that may be related, that pop up at the same time:

    09:40:19.0643: Referenced file '~/Scripts/_references.js' not found.
    09:40:19.0643: Referenced file 'C:\Users\vec02\Documents\Visual Studio 2013\Projects\ACERT3\packages\jQuery.2.2.0\Tools\jquery-2.2.0.intellisense.js' not found.

    Where are these files being referenced?  I don't know.  The 2nd error is pointing to a DIFFERENT PROJECT!!  This project doesn't use jquery 2.2 at all, it's still using 1.4.2.  And the organization is different, there is no ~/Scripts directory in this project.

    Friday, September 23, 2016 1:54 PM