Need help configuring ReportViewer on production server (Cannot open up C:\WINDOWS\Temp) RRS feed

  • Question

  • I'm getting this error from my ASP.NET application after deploying the ReportViewer and some reports to my production server:

    An unexpected error occurred while compiling expressions. Native compiler return value: ‘[BC2001] file 'C:\WINDOWS\TEMP\dmceum6b.0.vb' could not be found’.

    Stack Trace:

    Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: An unexpected error occurred while compiling expressions. Native compiler return value: ‘[BC2001] file 'C:\WINDOWS\TEMP\dmceum6b.0.vb' could not be found’.

    I need to know if I can somehow configure the ReportViewer to use a different directory for temp files. I cannot open up C:\WINDOWS\Temp to the AppPool user. Someone please help. Thanks.

    Thursday, April 23, 2009 8:08 PM

All replies

  • Does anyone have any idea about this? I'm think it might be the ITemporaryStorage settings in web.config, but it doesn't sounds like it as I found something that says that this is only for remote-mode reports. Mine are local-mode. Does anyone have any ideas about this? Thanks.
    Wednesday, May 20, 2009 7:44 PM
  • I had a similar issue and I ended up adding the NETWORK SERVICE user to the C:\Windows\Temp directory with full access.  I think I also added the EVERYONE group with the default access as well.

    Friday, June 5, 2009 8:40 PM
  • Thanks for responding.

    However, that's the problem. I simply cannot assign that user (not the NETWORK SERVICE user in this case, but the user that the AppPool is running as) write access to the Windows %TEMP% directory. That is a HUGE security hole and we have very strict contracts that prohibit that sort of thing.

    It seems like when the ReportViewer was built they should have added a simple configuration setting where you can specify a different directory to use for these temporary files. The only aswer I can find is to basically lower my security settings to an unacceptable level. How can this be?

    Again, thanks for responding, nonetheless.


    Friday, June 5, 2009 8:46 PM
  • Unfortunately when the ReportViewer is ran in localmode it requires full trust and must be able to write to windows\temp.

    This issue comes up a lot, and it definitely makes sense to make this configurable. I will talk around here and see what people think about changing this for the next version of the viewer (although I certainly can't promise anything).

    I also recommend filing a bug for this in Connect (, bugs filed there come straight to the team and we definitely take them seriously.
    This posting is provided "AS IS" with no warranties, and confers no rights.
    Thursday, June 11, 2009 12:19 AM
  • I'm having the same problem.

    I've submitted a suggestion on connect for Visual Studio 2010 since this update is close to release.
    Saturday, June 13, 2009 10:42 AM