当前位置: 首页 > 编程语言 > C#

无法加载文件或程序集Microsoft.ReportViewer.WebForms.XmlSerializers分享

时间:2023-04-10 18:33:55 C#

C#学习教程:无法加载文件或程序集Microsoft.ReportViewer.WebForms.XmlSerializers我正在从远程处理模式访问报告。这是我的代码:ReportServerDomain=System.Configuration.ConfigurationSettings.AppSettings["ReportServerDomain"];ReportServerUserName=System.Configuration.ConfigurationSettings.AppSettings["ReportServerUserName"];ReportServerPassword=System.Configuration.ConfigurationSettings.AppSettings["ReportServerPassword"];StringReportFolder=System.Configuration.ConfigurationSettings.AppSettings["ReportFolderName"];rptUrl=newUri(Convert.ToString(System.Configuration.ConfigurationSettings.AppSettings["ReportURL"]));IReportServerCredentialsirsc=newCustomReportCredentialsToCreateStatement(ReportServerUserName,ReportServerPassword,ReportServerDomain);ReportViewer1.ServerReport.ReportServerCredentials=irsc;ReportViewer1.ProcessingMode=Microsoft.Reporting.WebForms.ProcessingMode.Remote;parameters=newReportParameter[1];parameters[0]=newReportParameter("ClientStatementBatchId",ds.Tables["ClientStatemtntBatch"].Rows[0]["ClientStatementBatchID"].ToString());ReportViewer1.ServerReport.ReportServerUrl=rptUrl;ReportViewer1.ServerReport.ReportPath="/"+ReportFolder+"/ClientStatements";ReportViewer1.ServerReport.SetParameters(parameters);//我收到错误在这一行上。ReportViewer1.ServerReport.Refresh();错误是:无法加载文件或程序集“Microsoft.ReportViewer.WebForms.XmlSerializers,Version=9.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a”或其依赖项之一系统找不到指定的文件。任何人都可以帮助我,如何解决这个问题?谢谢,D.Bernardin您是否尝试过重新安装ReportViewer可再发行组件?您可以在此处找到链接http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=6576http://www.microsoft.com/download/en/details.aspx?id=4016第一个是VS2008报表查看器相关的(另一个是2005版本),是应该解决问题的那个。这个问题的根本原因是Microsft.ReportViewer.Webformsdll的版本问题。解决方法是到http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=6576下载运行exeReportViewer.exe。我们实际的问题是我们报表相关的dll是指向一些旧版本,即不是版本11.0.0.0。一旦此exe正常运行,它将正确指向版本11.0.0.0。为了正常工作,请在两个网页配置中输入相同的“和注册区以上是C#学习教程:无法加载文件或程序集需要了解更多C#学习教程,希望大家多多关注——”这篇文章整理自网络,不代表立场。如涉及侵权,请点击右侧联系管理员删除。如需转载请注明出处: