views:

227

answers:

2

This is driving me bananas -- I've got a web app with an existing report being displayed by version 10 of the ReportViewer without a problem. We're expanding the site, and I've created a new report based an a second local business object (we're integrating with NetSuite web services). The page loads and requests the data, which is passed back just fine - but, the page throws an exception in the generated markup when trying to create the ReportViewer instance: Microsoft JScript runtime error: 'Microsoft' is undefined.

Clicking continue loads the page with error text:

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.

I'm running this localhost with VS ASP.Net runtime server. Obviously, the first report viewer couldn't load its report if my web config wasn't right, so that can't be it.

I did get the second report to load one time successfully, but many subsequent attempts all result in the above. I've tried deleting the report on the new page, and copying in the one that works from the original page, pointing to its report/data source, and I get the same result. Baffling!

+1  A: 

Hi Michael...I believe you do need to add the key to your web.config file. You also need to add a reference to the ReportView component inside of the aspx file that has the report viewer on it. Web.config should look something like

 <assemblies>
    <add assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
    <add assembly="Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
</assemblies>
<httpHandlers>
   <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false" />
</httpHandlers>

Aspx file should have near the top of the html

<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
MikeTWebb
any update on this?
None from me.....
MikeTWebb
A: 

Thanks, Mike, I've got all that in WebConfig and the new page. It just seems adding a new form with another reportviewer generates the exception.

Maybe there's an issue with the dev server in VS2010? I'm going to try running in IIS localhost and see if there's a difference.

Michael

Michael Conner
did you find a solution?