Occasional “Access denied” to 'C:\WINDOWS\TEMP\' files

纵饮孤独 提交于 2019-12-20 01:03:33

问题


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: An error occurred during local report processing. ---> Microsoft.Reporting.DefinitionInvalidException: The definition of the report 'C:\Inetpub\wwwroot\orders\Reports\Reports\Pending Renewals.rdlc' is invalid. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: An unexpected error occurred in Report Processing. ---> System.UnauthorizedAccessException: Access to the path 'C:\WINDOWS\TEMP\expression_host_b5ec9f67a3ab42cfb53a75588aed6f75.dll' is denied.

or

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:\WINDOWS\TEMP\expression_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.


回答1:


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.

Hope, this can help you



来源:https://stackoverflow.com/questions/3131529/occasional-access-denied-to-c-windows-temp-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!