4
votes

I am encountering a problem when I upload my application in the file server,

If I run the report that is included in my web application, a problem is occurred:

An error occurred during local report processing. The definition of the report 'App_Reports\sampleReport.rdlc' is invalid. An unexpected error occurred while compiling expressions. Native compiler return value: ‘[BC2001] file 'C:\Windows\TEMP\oxdarnay.0.vb' could not be found’.

The problem occurred when I include this expression in the table in RDLC

=(Fields!Field1.Value + Fields!Field2.Value) - Fields!Field2.Value

When I do not include that expression, the report is properly working with no errors.

When I run it locally in my computer including that expression, there is no problem, what could be the possible problem with this? Is the IIS in the file server is not properly configured?

3
Why you add and subtract Fields!Field2.Value? Fields1 or Fields2 can be NULL or alphanumeric?tezzo
nope it is not null or alphanumeric, that computation is for accounting purposes..Doflamingo Doquixote
what happen if you simplify your expression and use only: =Fields!Field1.Valuetezzo
is this the only expression in the report? if yes, maybe I find a solution using google...tezzo

3 Answers

5
votes

You have to change the AppPool account to a user with write permissions to the TEMP directory.

Link: ASP.NET ReportViewer Native compiler return value: ‘[BC2001] file’ error

0
votes

I tried following solution in Visual studio 2013 and it worked,

  1. GO to IIS->Application pool.
  2. Select your application pool on which your site is published.
  3. Right click and go to Advanced setting->Process model->Identity->click on side button.
  4. Select Built-in account-> select LocalSystem->Ok->Ok.
  5. Refresh Application pool.
  6. Finish.
0
votes

Solution:

  1. Go to IIS
  2. Verify on which application pool your project is running.
  3. My Application using Network services.
  4. So, now go to folder C:\Windows\
  5. Right click on "Temp" Folder.
  6. Providing permissions will fix it.