Error opening aspnet page C#. Could not load file or Assembly 'Microsoft.ReportViewer.Common, Version=12.0.0.0

Asked

Viewed 217 times

0

Good evening, everyone.

I have developed a website, which on a given page shows a report. Locally it works normally, but when I run on the published page, it gives the error:

Server Error in '/' Application.
Could not load file or assembly 'Microsoft.ReportViewer.Common, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.ReportViewer.Common, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Source Error:


Line 14:         <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
Line 15: 
Line 16:         <rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" Font-Size="8pt" Height="100%" WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt" Width="100%">
Line 17:             <LocalReport ReportPath="relatorios\cadastro\cliente\rptCliente.rdlc">
Line 18:                 <DataSources>


Source File: E:\Domains\precisorapido.com.br\wwwroot\relatorios\cadastro\cliente\RelCliente.aspx    Line: 16

Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.ReportViewer.Common, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' could not be loaded.


WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].


Stack Trace:


[FileLoadException: Could not load file or assembly 'Microsoft.ReportViewer.Common, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
   Microsoft.Reporting.WebForms.LocalReport..ctor() +0
   Microsoft.Reporting.WebForms.ReportHierarchy..ctor(ServerReport serverReport) +104
   Microsoft.Reporting.WebForms.ReportViewer.CreateReportHierarchy() +51
   Microsoft.Reporting.WebForms.ReportViewer..ctor() +294
   ASP.relatorios_cadastro_cliente_relcliente_aspx.__BuildControlReportViewer1() in E:\Domains\precisorapido.com.br\wwwroot\relatorios\cadastro\cliente\RelCliente.aspx:16
   ASP.relatorios_cadastro_cliente_relcliente_aspx.__BuildControlform1() in E:\Domains\precisorapido.com.br\wwwroot\relatorios\cadastro\cliente\RelCliente.aspx:12
   ASP.relatorios_cadastro_cliente_relcliente_aspx.__BuildControlTree(relatorios_cadastro_cliente_relcliente_aspx __ctrl) in E:\Domains\precisorapido.com.br\wwwroot\relatorios\cadastro\cliente\RelCliente.aspx:1
   ASP.relatorios_cadastro_cliente_relcliente_aspx.FrameworkInitialize() in E:\domains\precisorapido.com.br\_rhfiles\aspnet\root\75bebe76\acefe9a3\App_Web_zwfsn2gh.0.cs:0
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +48
   System.Web.UI.Page.ProcessRequest() +72
   System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +22
   System.Web.UI.Page.ProcessRequest(HttpContext context) +58
   ASP.relatorios_cadastro_cliente_relcliente_aspx.ProcessRequest(HttpContext context) in E:\domains\precisorapido.com.br\_rhfiles\aspnet\root\75bebe76\acefe9a3\App_Web_zwfsn2gh.0.cs:0
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +188
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.2114.0 

In my code References, you have the dll s:

inserir a descrição da imagem aqui

What’s wrong with it?

  • You even looked in the project bin folder published if the dlls are there: Microsoft.ReportViewer.Common?

  • 1

    Yes they are @d-Aguilar. I updated Reporterviewer and did not give this error. Now gives the following error: An error occurred During local report Processing. The report Definition for report 'rptCliente' has not been specified Could not find file 'E: Domains precisorapido.com.br wwwroot relatórios cadastro cliente rptCliente.rdlc'. Remembering that locally it works.

  • 1

    Rodrigo, usually when we publish, the rdlc files are not copied to the server. See if this rptCliente.rdlc file has been published on the server.

  • Actually it wasn’t. I’ll put it on and take the test. Thank you.

  • I put the file . rdlc and now the error has changed. Stayed: An error occurred During local report Processing. The Definition of the report 'reports client registration rptCliente.rdlc' is invalid. An Unexpected error occurred in Report Processing. Could not load file or Assembly 'Microsoft.ReportViewer.Processingobjectmodel, Version=12.0.0.0, Culture=neutral, Publickeytoken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.