Click here to Skip to main content
14,218,548 members
Rate this:
Please Sign up or sign in to vote.
I need some help with the following problem:

I've been using a MS ReportViewer component in a website for a while now, but recently I've been getting the error shown below.

The type 'Microsoft.Reporting.WebForms.ReportViewer' exists in both 'c:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\8.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll' and 'c:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\9.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll'

Summery Sir,
It's started an app in VS 2005 NET 2.0 / Sql 2005 / RDLC reporting services.

Now I wanted to switch to VS 2008 (to take advantage of NET 3.5). On the same PC. So installed VS 2008 and VWG for net 3.5 - all works ok. I had to install Sql 2008 / RDLC Reporting Services

When I open a report in VS 2008, it is converted to a new format. That's ok.

my aspx this

<%@ Page Language="C#" MasterPageFile="~/M.master" AutoEventWireup="true" CodeFile="Abc.aspx.cs" Inherits="Reports_Abc" Title="Untitled Page" %>
<%@ Register Src="WebUserControl.ascx" TagName="WebUserControl"

    TagPrefix="uc1" %>
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

    Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Content" Runat="Server">
    <uc1:WebUserControl ID="WebUserControl1" runat="server" />
    <rsweb:reportviewer id="ReportViewer1" runat="server" width="100%"></rsweb:reportviewer>
</asp:Content>



and
some part of config file

<system.web>
  <!-- 
            Set compilation debug="true" to insert debugging 
            symbols into the compiled page. Because this 
            affects performance, set this value to true only 
            during development.
        -->
  <httphandlers>
    <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
      validate="false" />
  </add></httphandlers>
  <compilation debug="true">
    <buildproviders>
      <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
    </buildproviders>
    <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" />
      <add assembly="Microsoft.ReportViewer.WinForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
    </assemblies>
  </compilation>
    
</system.web>
pls give any suggession for this problem...?
Posted
Updated 23-Mar-17 11:09am
v5
Comments
bluesathish 7-Oct-13 2:12am
   
Go to Solution explorer and remove all 'Microsoft.ReportViewer.WebForms references. Then Add the references from your latest directory (VS2008). Go to Build menu and Click clean solution and Click Rebuild solution.
Faizymca 7-Oct-13 3:02am
   
Thanx for reply sir, Sir i want to remove in solution explorer bt i have not found the remove Microsoft.ReportViewer.WebForms references. of right click of web application so here i clean the solution and build ...problem still reamin ...i am new sir pls help
bluesathish 7-Oct-13 3:15am
   
Try to Click the reference from Solution explorer and press delete button from your keyboard. I'm not sure this is available in VS2008, since i'm using vs2010. Jusy try and revert.
Faizymca 7-Oct-13 4:13am
   
ok sir, i also convert my code into VS 2010 ....and i 'll try according to u sir,

Delete all *.dll in bin folder of web application...
Faizymca 7-Oct-13 4:41am
   
Sir i hv done like right click of web application in sln and add refference browse the dll and Delete all them in bin folder and restart the computer and add again build the sln but still problem remains...
bluesathish 7-Oct-13 4:45am
   
Try this, Go to Build menu and Click clean solution and Click Rebuild solution.
Faizymca 7-Oct-13 7:26am
   
thanx...Bluesathish sir for your suggestion i resolved....its...here problems in every page change the version = 9.0.0.0 as per as config file then rebuild sln...ok
bluesathish 7-Oct-13 7:32am
   
Thank you, i've posted my comment into the solution section for your question.
Faizymca 7-Oct-13 7:32am
   
Sir, Many thanx for u i hv another problem when i publish application upload on IIS(web server)then its give the error---
An error occurred during local report processing.
The definition of the report 'Main Report' is invalid.
An unexpected error occurred while compiling expressions. Native compiler return value: ‘[BC2001] file 'C:\Windows\TEMP\qo3mxhwo.0.vb' could not be found’. ---

So i think.. server doesn't have permission on this TEMP folder.

If your application is running under IIS, we need to grant permission (modify or edit) to account "ASPNET" or "NETWORK SERVICE" on this TEMP folder. how can i resolved its ...
Faizymca 7-Oct-13 3:04am
   
I also remove the all files "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files" sir ....
Member 13329915 8-Aug-17 7:18am
   
I had Remove All my refrences agains reportviewer and clean solution and rebuield solution again but problem not solved
Rate this:
Please Sign up or sign in to vote.

Solution 1

Go to Solution explorer and remove all 'Microsoft.ReportViewer.WebForms references. Then Add the references from your latest directory (VS2008). Go to Build menu and Click clean solution and Click Rebuild solution.

Regards,
BlueSathish
   
Rate this:
Please Sign up or sign in to vote.

Solution 2

check this link on the resolution to bind old and new Dll's in the config.

http://stackoverflow.com/questions/9429277/problems-with-reportviewer-assemblies-in-vs2010

example below

<runtime><br />
    <assemblybinding xmlns="urn:schemas-microsoft-com:asm.v1" appliesto="v2.0.50727"><br />
  <dependentassembly><br />
    <assemblyidentity name="Microsoft.ReportViewer.WebForms" publickeytoken="b03f5f7f11d50a3a" /><br />
    <bindingredirect oldversion="9.0.0.0" newversion="10.0.0.0" /><br />
  </dependentassembly><br />
</assemblybinding><br />
   
v2
Rate this:
Please Sign up or sign in to vote.

Solution 3

on web.config review assembly info. appear two times "Microsoft.ReportViewer.WebForms" one with 12.0.0.0 and other with 11.0.0.0. just get one of this.
   
Comments
CHill60 23-Mar-17 20:39pm
   
You haven't added any new information to solutions posted over 3 years ago. Please don't do this

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100