Click here to Skip to main content
13,633,537 members
Rate this:
 
Please Sign up or sign in to vote.
See more:
An error occurred during local report processing.
The definition of the report 'E:\Markfed\Link_Report\OpeningStockReport.rdlc' is invalid.
An unexpected error occurred while compiling expressions. Native compiler return value: ‘[BC2012] can't open 'C:\Windows\TEMP\expression_host_9c0eaa032bb64a25be60c4cccf4464f2.dll' for writing’.

i have added all below dll

Microsoft.ReportViewer.Common.dll
Microsoft.ReportViewer.ProcessingObjectModel.dll
Microsoft.ReportViewer.WebForms.dll
Microsoft.ReportViewer.WinForms.dll

error occurred on server.in local project work fine

What I have tried:

In local project work fine no error show but on server error occurred
Posted 13-Jun-18 1:34am
Updated 13-Jun-18 1:44am

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

The process has no write access to the folder C:\Windows\TEMP which is expected because that is a system folder requiring administrative privileges for reading and writing.

That it works in your local project indicates that you are running it there as Administrator (or - even worse - has changed the access rights of the folder).

You should check where in your code that folder is defined as temporary folder instead of using one of the temporary folders of the user running the application.
  Permalink  
Comments
13-Jun-18 8:05am
   
but why it show error in .rdlc reporting tool .its work fine in .aspx page on server in same folder.. and how to give permission after deploy
Jochen Arndt 13-Jun-18 8:19am
   
I don't know why it works on some systems. But I have explained why it does not work on other systems. The solution is not to give all systems access to the folder but to do it right by not using that folder.

Find out where it is defined in your code / settings and replace it with one of the common temporary folders.

Or does the error occur during some kind of setup? Then the setup must be executed as Administrator.

The folder "%WINDIR%\TEMP" is for usage by the system only with recent Windows version. It has been used by Windows 2/3 and 9x as temp folder but should not be used anymore by applications since (AFAIK) Windows XP.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Cookies | Terms of Service
Web01 | 2.8.180712.1 | Last Updated 13 Jun 2018
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100