报告查看器 2010,IO.Exception\

ReportViewer 2010, IO.Exception\

我有一个问题,我认为它是基于特定机器的,但是我想知道,如果它出现在另一台机器上,如何解决它。

我开发了 WPF 项目 (.NET 4),我使用 Installshield LE 安装它。该程序的先决条件也是我之前安装的 ReportViewer 2010(如果需要)。

我已经在以下机器上安装了该程序:

  1. Windows 7 64 位 SP1
  2. Windows 7 32 位
  3. Windows XP SP3(案例 1)
  4. Windows XP SP3(案例 2)
  5. Windows XP SP3(案例 3)

在所有上述机器中,我的报告 运行 都很好,除了 #5(案例 3),我收到以下错误:

 Microsoft.Reporting.WinForms.LocalProcessingException: An error occurred during local report processing. ---> 
    Microsoft.Reporting.DefinitionInvalidException: The definition of the report '' is invalid. ---> 
    Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: An unexpected error occurred in Report Processing. ---> 
    System.IO.IOException: The process cannot access the file 'C:\Documents and Settings\<WindowsLogOnName>\Local Settings\Temp\expression_host_2e380b8068bb4ef5a53225faab4ebcb4.dll' because it is being used by another process.

所有机器都访问同一个数据库,我正在测试的报告在每种情况下都是相同的。

有没有人以前遇到过这个错误并且有任何线索??

我听说恶意软件和防病毒程序会阻止访问 localreport 临时文件,因为报告中的表达式基本上是 VBScript。尝试禁用这些并重试。 Here is the only source I have found on this.

否则,尝试一些事情:

  1. 检查 RDLC 和临时文件的文件权限。网络服务以及 ASP.NET 用户帐户需要访问这些服务。确保它具有完全控制,因为它需要执行权限以及读写权限。
  2. 检查磁盘space
  3. 尝试使用进程监视器(例如 Process Explorer)查看是否有任何其他程序占用了文件句柄。
  4. 尝试删除临时文件并重新启动或回收应用程序池。
  5. 也许搜索您的事件查看器以找到有关该问题的更多信息?

如果 none 有效,您最好直接向 MS 报告该问题。