2014-11-21 68 views
0

我很想走出我的联盟,所以我很抱歉如果我问一个重复的问题,但我不知道从哪里开始。ASP.NET注册程序集错误

我最近从服务器SERVER1迁移了一个SQL数据库,并将其与托管访问数据库的Web界面的IIS并置到SERVER2。 Web界面现在正确地访问数据库,通过某些应用程序功能,我可以正确访问数据,而不会出错。但是,当我尝试运行报告时,出现此错误:

如何解决此问题?

Server Error in '/' Application. 
-------------------------------------------------------------------------------- 

Parser Error 
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. 

Parser Error Message: Could not load file or assembly 'Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. 

Source Error: 


Line 5:  Namespace="AjaxControlToolkit" 
Line 6:  TagPrefix="ajaxToolkit" %> 
Line 7: <%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" 
Line 8:  Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %> 
Line 9: 


Source File: /source/Report5.aspx Line: 7 

Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' 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]. 




-------------------------------------------------------------------------------- 
Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.4028 

UPDATE

我打开日志记录,并得到这个更详细的错误:

=== Pre-bind state information === 
LOG: User = AURORAFCS\raj 
LOG: DisplayName = Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 
(Fully-specified) 
LOG: Appbase = file:///C:/Family/ 
LOG: Initial PrivatePath = C:\Family\bin 
Calling assembly : (Unknown). 
=== 
LOG: This bind starts in default load context. 
LOG: Using application configuration file: C:\Family\web.config 
LOG: Using host configuration file: \\?\c:\windows\microsoft.net\framework\v2.0.50727\aspnet.config 
LOG: Using machine configuration file from c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config. 
LOG: Post-policy reference: Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 
LOG: Attempting download of new URL file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/root/dc46260e/807e5b0d/Microsoft.ReportViewer.WebForms.DLL. 
LOG: Attempting download of new URL file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/root/dc46260e/807e5b0d/Microsoft.ReportViewer.WebForms/Microsoft.ReportViewer.WebForms.DLL. 
LOG: Attempting download of new URL file:///C:/Family/bin/Microsoft.ReportViewer.WebForms.DLL. 
LOG: Attempting download of new URL file:///C:/Family/bin/Microsoft.ReportViewer.WebForms/Microsoft.ReportViewer.WebForms.DLL. 
LOG: Attempting download of new URL file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/root/dc46260e/807e5b0d/Microsoft.ReportViewer.WebForms.EXE. 
LOG: Attempting download of new URL file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/root/dc46260e/807e5b0d/Microsoft.ReportViewer.WebForms/Microsoft.ReportViewer.WebForms.EXE. 
LOG: Attempting download of new URL file:///C:/Family/bin/Microsoft.ReportViewer.WebForms.EXE. 
LOG: Attempting download of new URL file:///C:/Family/bin/Microsoft.ReportViewer.WebForms/Microsoft.ReportViewer.WebForms.EXE. 

UPDATE2

使用融合记录器,我有这个更详细的消息,这鞋它是一个“文件无法找到”的错误。但是,我已经安装了可再发行组件,为什么它不能找到DLL?

*** Assembly Binder Log Entry (11/21/2014 @ 4:00:35 PM) *** 

The operation failed. 
Bind result: hr = 0x80070002. The system cannot find the file specified. 

Assembly manager loaded from: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll 
Running under executable c:\windows\system32\inetsrv\w3wp.exe 
--- A detailed error log follows. 

=== Pre-bind state information === 
LOG: User = AURORAFCS\raj 
LOG: DisplayName = Microsoft.ReportViewer.WebForms, Version=8.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 
(Partial) 
LOG: Appbase = file:///C:/Family/ 
LOG: Initial PrivatePath = C:\Family\bin 
LOG: Dynamic Base = c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\dc46260e 
LOG: Cache Base = c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\dc46260e 
LOG: AppName = 807e5b0d 
Calling assembly : (Unknown). 
=== 
LOG: This bind starts in default load context. 
LOG: Using application configuration file: C:\Family\web.config 
LOG: Using host configuration file: \\?\c:\windows\microsoft.net\framework\v2.0.50727\aspnet.config 
LOG: Using machine configuration file from c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config. 
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind). 
LOG: Attempting download of new URL file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/root/dc46260e/807e5b0d/Microsoft.ReportViewer.WebForms.DLL. 
LOG: Attempting download of new URL file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/root/dc46260e/807e5b0d/Microsoft.ReportViewer.WebForms/Microsoft.ReportViewer.WebForms.DLL. 
LOG: Attempting download of new URL file:///C:/Family/bin/Microsoft.ReportViewer.WebForms.DLL. 
LOG: Attempting download of new URL file:///C:/Family/bin/Microsoft.ReportViewer.WebForms/Microsoft.ReportViewer.WebForms.DLL. 
LOG: Attempting download of new URL file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/root/dc46260e/807e5b0d/Microsoft.ReportViewer.WebForms.EXE. 
LOG: Attempting download of new URL file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/root/dc46260e/807e5b0d/Microsoft.ReportViewer.WebForms/Microsoft.ReportViewer.WebForms.EXE. 
LOG: Attempting download of new URL file:///C:/Family/bin/Microsoft.ReportViewer.WebForms.EXE. 
LOG: Attempting download of new URL file:///C:/Family/bin/Microsoft.ReportViewer.WebForms/Microsoft.ReportViewer.WebForms.EXE. 
LOG: All probing URLs attempted and failed. 
+0

请参阅[此答案](http://stackoverflow.com/q/16493817/656243)。 – 2014-11-21 20:24:36

+0

你可以看看你的项目,并选择参考和报告哪个版本的Microsoft.ReportViewer.WebForms.dll被包括在内? – 2014-11-21 21:45:24

+0

(我不做asp.net我只是想管理一个多年未被管理的网络,所以我会尽我所能为你提供正确的信息。这个应用程序是由一个谁是没有周围时间更长,除了检索旧记录外,不会使用该应用。我只需要处理SQL服务器) – NonSecwitter 2014-11-21 22:04:23

回答

3

你需要确定你的目标是什么版本的ReportViewer控件和你的Web应用程序部署在同一台服务器上安装适当的包。

Microsoft Report Viewer 2010 Redistributable Package

Microsoft Report Viewer 2008 SP1 Redistributable

Microsoft Report Viewer Redistributable 2008

Microsoft Report Viewer Redistributable 2005

我相信逻辑如下:

  • 的ReportViewer 2010可针对使用的SQL Server 2008(SP2)和2012年

  • 的ReportViewer 2008可用于针对SQL Server 2008和2005

  • 的ReportViewer 2005可用于针对SQL Server 2005

+0

我刚刚在上面看到您的评论。 – 2014-11-21 20:25:40

+0

RV 2010 ---> SSRS 2008(SP2)2012 | RV 2008 - > SSRS 2005/2008 | RV 2005 - > SSRS 2005.我非常确定这是它。 – 2014-11-21 20:29:31

+0

我如何确定? – NonSecwitter 2014-11-21 20:42:31