偶尔出现“拒绝访问"到“C:WINDOWSTEMP"文件 [英] Occasional "Access denied" to 'C:WINDOWSTEMP' files
问题描述
在我的 ASP.NET MVC 应用程序中,当我尝试从 Microsoft Reporting Services 程序集打开或生成 LocalReport 时,有时会遇到这些错误:
In my ASP.NET MVC application I sometimes get these errors when I try to open or generate LocalReport from Microsoft Reporting Services assembly:
Microsoft.Reporting.WebForms.LocalProcessingException:本地报告时出错加工.--->Microsoft.Reporting.DefinitionInvalidException:报告的定义'C:InetpubwwwrootordersReportsReportsPendingRenewals.rdlc' 无效.--->Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:报告中出现意外错误加工.--->System.UnauthorizedAccessException:访问路径'C:WINDOWSTEMPexpression_host_b5ec9f67a3ab42cfb53a75588aed6f75.dll' 被拒绝.
Microsoft.Reporting.WebForms.LocalProcessingException: An error occurred during local report processing. ---> Microsoft.Reporting.DefinitionInvalidException: The definition of the report 'C:InetpubwwwrootordersReportsReportsPending Renewals.rdlc' is invalid. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: An unexpected error occurred in Report Processing. ---> System.UnauthorizedAccessException: Access to the path 'C:WINDOWSTEMPexpression_host_b5ec9f67a3ab42cfb53a75588aed6f75.dll' is denied.
或
System.Web.HttpUnhandledException:类型异常'System.Web.HttpUnhandledException'被抛出.--->Microsoft.Reporting.WebForms.LocalProcessingException:本地报告时出错加工.--->Microsoft.Reporting.DefinitionInvalidException:报告的定义 'Main报告"无效.--->Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:报告中出现意外错误加工.--->System.UnauthorizedAccessException:访问路径'C:WINDOWSTEMPexpression_host_a1670a6e6b96411790645cb12e50897d.dll' 被拒绝.
System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> Microsoft.Reporting.WebForms.LocalProcessingException: An error occurred during local report processing. ---> Microsoft.Reporting.DefinitionInvalidException: The definition of the report 'Main Report' is invalid. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: An unexpected error occurred in Report Processing. ---> System.UnauthorizedAccessException: Access to the path 'C:WINDOWSTEMPexpression_host_a1670a6e6b96411790645cb12e50897d.dll' is denied.
可能是什么原因?大多数时候它都可以工作,所以这不是安全问题.我该如何解决?
What can be the reason? Most of the time it works so it's not security issue. How do I fix it?
这是我发现的内容,但我不想使用使用字段而不是报告参数"的解决方案.
Here's what I've found but I'd not like to use "use fields instead of report parameters" solution.
推荐答案
我也遇到了同样的问题.但是,当我通过以管理员身份运行"选项启动我的 Visual Studio 时,问题不再出现.
I have also faced the same problem. But, when i start my visual studio by "Run As Administrator" Option, the problem wasn't arise anymore.
希望能帮到你
这篇关于偶尔出现“拒绝访问"到“C:WINDOWSTEMP"文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!