We had a .Net 2 (Visual Studio 2008) website which we have upgraded to .Net 4 and VS2010. This used ReportViewer to access the reporting services reports. (We have upgraded to SQL 2008 as well now.)
I have changed my solution to use ReportViewer v10, and I can see that from the references, and I have changed all pages and web.config to point to v10 too. However when I run the deployed website I get the following error:
Could not load file or assembly 'Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
I can't understand where it's looking for the v9 assembly from. Has anyone seen this problem before on how to fix it?
Yes I have managed to solve the problem. What I did was create a new web project and moved all the pages and code to the new project and then created a new web deployment project for it! No problems now.
Kind regards
Sidharth
Marked as answer by Sidharth Nayyar on Mar 21, 2012 10:53 AM
Sidharth Nay...
Member
14 Points
5 Posts
Could not load file or assembly Microsoft.ReportViewer.WebForms, Version=9.0.0.0
Mar 16, 2012 02:45 PM|LINK
Dear all,
We had a .Net 2 (Visual Studio 2008) website which we have upgraded to .Net 4 and VS2010. This used ReportViewer to access the reporting services reports. (We have upgraded to SQL 2008 as well now.)
I have changed my solution to use ReportViewer v10, and I can see that from the references, and I have changed all pages and web.config to point to v10 too. However when I run the deployed website I get the following error:
I can't understand where it's looking for the v9 assembly from. Has anyone seen this problem before on how to fix it?
Kind regards
Sidharth
Snippets from web.config:
... <compilation debug="true" targetFramework="4.0"> <assemblies> <add assembly="Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> <add assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> ... </assemblies> <buildProviders> <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> </buildProviders> </compilation> ... <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> </system.web> ... <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=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/> <add name="Reserved-ReportViewerWebControl-axd" path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" resourceType="Unspecified" preCondition="integratedMode"/> </handlers> ...Sidharth Nay...
Member
14 Points
5 Posts
Re: Could not load file or assembly Microsoft.ReportViewer.WebForms, Version=9.0.0.0
Mar 16, 2012 03:10 PM|LINK
Found out something else - I ran process monitor and it is trying to access the following registry keys:
It gets a Name Not Found error when it does so - understandable as only report viewer 2010 redistributable is installed.
necro_mancer
Star
8073 Points
1587 Posts
Re: Could not load file or assembly Microsoft.ReportViewer.WebForms, Version=9.0.0.0
Mar 19, 2012 06:13 AM|LINK
hi sidhath,
have you managed to solve this issue?
Professional SQL 2008 R2 Service
Sidharth Nay...
Member
14 Points
5 Posts
Re: Could not load file or assembly Microsoft.ReportViewer.WebForms, Version=9.0.0.0
Mar 21, 2012 10:53 AM|LINK
Hi,
Yes I have managed to solve the problem. What I did was create a new web project and moved all the pages and code to the new project and then created a new web deployment project for it! No problems now.
Kind regards
Sidharth