4

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?

  • Why you add and subtract Fields!Field2.Value? Fields1 or Fields2 can be NULL or alphanumeric? – tezzo Jul 02 '13 at 07:10
  • nope it is not null or alphanumeric, that computation is for accounting purposes.. – Doflamingo Doquixote Jul 02 '13 at 07:41
  • what happen if you simplify your expression and use only: =Fields!Field1.Value – tezzo Jul 02 '13 at 08:08
  • is this the only expression in the report? if yes, maybe I find a solution using google... – tezzo Jul 02 '13 at 08:16
  • Could you please have a look at my answer on [An error occurred during report processing. RLDC reporting in ASP.NET MVC](http://stackoverflow.com/questions/28966954/an-error-occurred-during-report-processing-rldc-reporting-in-asp-net-mvc)? – Murat Yıldız Apr 24 '16 at 20:16

3 Answers3

5

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

tezzo
  • 10,858
  • 1
  • 25
  • 48
0

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.
pravprab
  • 2,301
  • 3
  • 26
  • 43
0

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.
Unheilig
  • 16,196
  • 193
  • 68
  • 98