title: Occasional "Access denied" to 'C:\WINDOWS\TEMP\' files
body: <p>In my ASP.NET MVC application I sometimes get these errors when I try to open or generate LocalReport from Microsoft Reporting Services assembly:</p>
  
  <blockquote>
    <p>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.</p>
  </blockquote>
  
  <p>or</p>
  
  <blockquote>
    <p>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.</p>
  </blockquote>
  
  <p>What can be the reason? Most of the time it works so it's not security issue. How do I fix it?</p>
  
  <p>Here's <a href="http://forums.asp.net/t/1479201.aspx" rel="nofollow noreferrer">what I've found</a> but I'd not like to use "use fields instead of report parameters" solution.</p>