ReportViewer control problem

Status
Not open for further replies.
I have a page that displays a SQL Server Reporting Services report in a reportviewer control.

The page will not display the this control however, it gives me an error message that reads "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."

Adding this httpHandler to the web.config then causes the entire site to stop working, giving a 500 - Internal Server error.

My web.config contains
Code:
<?xml version="1.0"?>
<configuration>
	<system.web>
		<compilation debug="true" strict="false" explicit="true" targetFramework="4.0">
			<assemblies>
				<add assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
				<add assembly="Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
      </assemblies>
    </compilation>
		<customErrors mode="Off"/>
	</system.web>
	<connectionStrings>
		<add connectionString="Server=server;
                 Connection stuff stripped :)
	</connectionStrings>
	<system.net>
		<mailSettings>
			<smtp from=
                        Mail settings snipped
                        </smtp>
		</mailSettings>
	</system.net>
</configuration>

I'm using Visual Web Developer 2010 Express. Server is 2008 R2, with SQL Server 2008 R2. Reporting Services, and the report itself is fine - I can view the report in the Report Manager fine - I need to view it from a web page as it requires several keys, which are passed as session variables.

I'm a bit stuck, so this is more of an open ended question - anybody have any clues as to where the problem may lie?
 
Microsoft.ReportViewer.WebForms, Version=9.0.0.0,

Visual Studio 2010 typically uses version 10 of reportviewer. If you are connecting to SQL 2008, probably no reason not use version 10. I had a similar issue when I brought some projects forward from 2008 to 2010; the reportviewer controls imported using 9.

Don't remember exactly how I fixed it, but I think deleting all reportviewers from your project as well as the addassembly taghs and then readd them from the toolbox. It should recreate all the necessary references.

Alternately, you could try changing the version number from 9 to 10 and see if that works- You should be able to use the old reportviewer if you want, but as Akula mentioned it needs to be in the GAC.
 
The ReportViewer control is shown as in the GAC when selecting the items to go in the toolbox.

techix":e37apdk4 said:
Microsoft.ReportViewer.WebForms, Version=9.0.0.0,

Visual Studio 2010 typically uses version 10 of reportviewer. If you are connecting to SQL 2008, probably no reason not use version 10. I had a similar issue when I brought some projects forward from 2008 to 2010; the reportviewer controls imported using 9.

Where can I get version 10? Googling returns this page, and I've installed this, but the reportviewer control in the toolbox is still identified as version 9.0 :/
 
Akula":2k6tz04k said:
That is the redist which I highly doubt will install the ReportViewer Control in the Toolbox (redist is meant for web servers, etc.). You'll either have to manually add it, or install SQL 2008 R2 Management Studio and tools in order to get it (I'm not positive here).

Where would I get it? Only link I've found is the one above - and thats not right :(

I have SSMS and tools installed.


This is driving me nuts :(
 
Status
Not open for further replies.