Monday, March 24, 2008 12:24 PM
As per the advice on this forum, I've upgraded to the 2008 version of ReportViewer to fix the problem with huge PDF file sizes. I'm also hoping it might fix the GDI+ crash I mentioned in a previous post. I have 3 ReportViewer controls in different web forms. Of these, 2 of them work. The third one fails to compile with the error message below. No changes have been made to any of the webforms except to change the ReportViewer version from 188.8.131.52 to 184.108.40.206. Web.config was similarly updated. Any suggestions?
"BC30560: 'ReportViewer' is ambiguous in the namespace 'Microsoft.Reporting.WebForms'."
Monday, March 24, 2008 12:34 PMForget it. Spontaneously started working about an hour after the upgrade. Guess it must be an assembly cache issue or something.
Wednesday, July 16, 2008 9:12 AMplz help me any body who know how can solve Error BC30560
Tuesday, March 17, 2009 1:39 PMHi
I had the same problem you can solve it by going to your web.config file and check the <assemblies> you will find two assemblies with the same PublicKeyToken remove one of them most likely its "Microsoft.ReportViewer.WebForms"
- Marked As Answer by Robert BrucknerMicrosoft Employee, Moderator Saturday, March 21, 2009 11:11 PM
Monday, July 20, 2009 2:37 PMI am running into this same error. I have checked my assemblies and there are several with the same token. Microsoft.reporting.webforms has the same token as several of the system assemblies. Program compiles just fine, and can run locally. However, program will not publish. This is when I get error BC30560: 'ReportViewer' is ambiguous in the namespace 'Microsoft.Reporting.WebForms'. Any advice??
Monday, July 20, 2009 2:45 PMFound it. A global find for 8.0 turned up 2 that were buried. Thanks for the original post.
Thursday, September 09, 2010 5:40 PMI have a similar problem. My app works fine when deployed to the test server with only the 2008 Report Viewer Redistributable installed. But on the production server, both the 2005 and 2008 Report Viewer Redistributable packages are installed, which should be fine. The web.config in my app that uses the 2008 Report Viewer reads: (leaving out irrelevant references)
<add assembly="Microsoft.ReportViewer.Common, Version=220.127.116.11, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="Microsoft.ReportViewer.WebForms, Version=18.104.22.168, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=22.214.171.124, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
So there should not be confusion as to which report viewer version to use, as I specify the 9.0 which is 2008. When the site is accessed on the production server with both 2005 and 2008 Report Viewer Redistributables, I get the error:
BC30560: 'ReportViewer' is ambiguous in the namespace 'Microsoft.Reporting.WebForms'.
Before I added the line <remove extension=".rdlc"/>, I was getting the error:
The entry '.rdlc' has already been added.
Also.... The administrator of this server thinks the problem is that both the web.config in the other site which is accessing the 2005 viewer and my app which is accessing the 2008 viewer are using the same PublicKeyToken which by default is b03f5f7f11d50a3a. Can the different apps use the same token string or does my app need to use a different token? And how would I generate a new token?
Been trying to solve this for weeks...what am I doing wrong? Thanks for any and all help!!!
- Proposed As Answer by Ob1 Jacoby Tuesday, September 28, 2010 7:36 PM
Tuesday, September 28, 2010 7:36 PMOkay figured my problem out. Again, the problem was that the server had both the 2005 and 2008 report viewer redistributable package on a web server. My app used the 2008 version while someone else's app was using the 2005. This should be totally fine as long as you are referencing the correct version in your web.config. I only had reference to the 9.0 (2008 version) in my pages and my config file, so that should have been enough but I still got the ambiguous error. I finally found this on a random thread somewhere and it solved my issues immediately. I don't understand why it is needed exactly, but it worked after not getting any replies to the many threads I posted this to.
<assemblyIdentity name="Microsoft.ReportViewer.Common" publicKeyToken="B03F5F7F11D50A3A"/>
<bindingRedirect oldVersion="126.96.36.199" newVersion="188.8.131.52"/>
<assemblyIdentity name="Microsoft.ReportViewer.Webforms" publicKeyToken="B03F5F7F11D50A3A"/>
<bindingRedirect oldVersion="184.108.40.206" newVersion="220.127.116.11"/>
I left the entries I pasted in my previous post completely alone. So the only change I made was adding these binding redirects. Hope it helps someone else!
- Proposed As Answer by Ob1 Jacoby Tuesday, September 28, 2010 7:37 PM
Monday, October 25, 2010 6:07 PM
I seem to run into this same problme repeatedly. It usually does come down to the web.config file and cleaning out multiple entries but I often have to result in actually deleting the bin/obj directories and rebuilding. I've also found that when my published/production site hits this I've had to delete everything in the application directory and then republish insuring the clean web.config file is pushed and then it goes away (not sure what is sticking in memory causing that one). This last one was particularly frustrating because the development site was working fine and after republishing and copying the web.config file to production the problem persisted (even after bouncing the IIS). After deleting everything and republishing it started working fine.
Friday, April 01, 2011 12:23 AM
I had the same problem and I found a solution:
- I had a Web Site that was working on one server but not on a second one.
- The web site was developped with Visual Studio 2010 and Framework .NET 4.0. Both server have an application pool on IIS 7.0 for Framework 4.0.
- The first server has ReportViewer Redistribuable 2008 and 2010 (Version 9.0.0 and 10.0.0), the second server had NO ReportViewer Redistribuable installed at first
- When I ran the Web site on the second server I got an error saying that 'Microsoft.ReportViewer.Webforms' reference was missing.
- I manually add the DLL to the \bin directory of the published Web Site, still got the error.
- I installed the ReportViewer Redistribuable 2010 on the second server, this got me past the previous error.
- Now when I ran the web site again I had the error ''ReportViewer' is ambiguous in the namespace. After many hours of infructous research on the Web I took matters into my own hand.
- Check the web.config of your web site to see what version of the ReportViewer Webforms you are using. (in my case was 10.0.0)
- Check what version of the ReportViewer Redistribuanle is installed on the server (in my case 10.0.0 or 2010).
- Check if you have ReportViewer related DLL's in the \bin directory of your published Web site (in my case 9.0.0 - THAT WAS THE CULPRIT !). When running the report viewer did not know which version to use.
Basically is that the installed ReportViewer Redistribuable on the server, the ReportViewer references on the published Web Site have to match.
If your server support multiple web sites, you can have multiple ReportViewer Redistribuable versions installed on the same server.
Hope this will help some of you out there.