This is a migrated thread and some comments may be shown as answers.

Chart is being written to 'temp' folder and then gets access denied.

6 Answers 123 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 09 Dec 2012, 10:44 PM
We have a very strange issue. When a chart (contained in one of our reports) is passed more data (so there's more slices in the chart), it suddenly tries to write the image to the temp directory. The error we receive is this : 

An error has occurred while processing Chart 'chart2': Access to the path 'C:\Users\TEMP\AppData\Local\Temp\178d1d3be0014f17ad8416a62ce4b1ea' is denied.

If I go and give "Everyone" access to that folder it works successfully and I can see the image being saved in that directory. 

My hunch is that as we pass more data the image size increases and when it exceeds a certain size (e.g 100k) it stores it in the users temp folder. The other confusing thing to note is that I am also setting a file directory in web.config. I can see the reports getting saved to here. Why aren't the charts ? 

<Telerik.Reporting>
  <Cache provider="File">
    <Providers>
      <Provider name="File">
        <Parameters>
          <Parameter name="BasePath" value="C:\MyDataCache" />
        </Parameters>
      </Provider>
    </Providers>
  </Cache>
</Telerik.Reporting>

6 Answers, 1 is accepted

Sort by
0
Mark
Top achievements
Rank 1
answered on 10 Dec 2012, 08:17 AM
I should also point out that this problem occurs when hosting the Report Viewer in either SharePoint 2007 or SharePoint 2010 environment. Is there any way to programmatically configure the cache to store images in a certain directory? It looks like the charts don't obey base path that's set in web.config. 

Is this because they have their own data source ? I have also tried adding the charts as a sub report. Same issue.
0
Steve
Telerik team
answered on 12 Dec 2012, 01:46 PM
Hi Mark,

We're unable to reproduce the problem in a standalone web site/application project. Can you confirm this only happens if you integrate Telerik Reporting in Sharepoint? The fact that the chart image is trying to write to the temp folder only under some unclear conditions (passed more data) is even more baffling. By design the BasePath should be respected by the chart items as well.

If you are able to reproduce this problem outside of Sharepoint, can you please attach a sample project that we can run locally and investigate?

Kind regards,
Steve
the Telerik team

HAPPY WITH TELERIK REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

0
Mark
Top achievements
Rank 1
answered on 12 Dec 2012, 02:35 PM
Hi Steve

I have managed to get around this - I hope! I tracked it down the ImageFormat that the charts are set to. For some reason the designer won't allow me to change it from EMF. To get around this, I edited the serialised report in XML and changed it to "Jpeg". I also tried "Gif" and these both worked.

So in my opinion, the bug is either of these :

1. When an image gets cached that's greater than the 100k (this seem to tip the balance with EMF's) they get stored in a temp folder, not the folder you specify in the basepath for filecache. (I wasn't able to create a Jpeg this big, so don't know if this will happen).
2. Or, there's something in the code that generates the EMF.

With regard to reproducing the problem, there really isn't anything special going on :

1. Created a Report entirely using the Report Designer.
2. Got some data from the DB and exposed it through an Object Data Source.
3. Set the data source of the chart to method that returned a List<MyBusinessOjbect>

That's pretty much it.

If the Pie Chart results in 3 wedges - it was fine, if 4 or more, it blew up with an Access Denied error. (I am sure this is due to file size not number of wedges). It happens on SP 2007 and SP 2010.

Thanks
Mark


0
Steve
Telerik team
answered on 13 Dec 2012, 04:02 PM
Hello Mark,

We're glad you found a solution that works. The change in ImageFormat sounds convincing with the theory of this being a problem with the image size, but there is no such option/setting in the chart item and we're yet to try to reproduce in Sharepoint. We appreciate the description and steps you have provided to test this.

Regards,
Steve
the Telerik team

HAPPY WITH REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

0
Herman
Top achievements
Rank 1
answered on 13 Mar 2013, 02:30 PM
I have the same problem
Access to the path 'C:\Users\TEMP.ADS\AppData\Local\Temp\eef937ae9d4d428f88a9cb6eebe9c74a' is denied.

For now i have set the ImageFormat to gif in the designer file and that solves the problem, but if that file size increases i think you get the same problem.

This is my web.config, which says it may write temporary files to c:\temp not C:\Users\TEMP.ADS\AppData\Local\Temp\
<Telerik.Reporting>
    <Cache provider="File">
      <Providers>
        <Provider name="File">
          <Parameters>
            <Parameter name="BasePath" value="C:\Temp" />
          </Parameters>
        </Provider>
      </Providers>
    </Cache>
  </Telerik.Reporting>

I have tested this with version 6.2.12.1017 and with the latest 7.0.13.220. This issue is not solved in the latest version.

When will you fix this issue?





0
Chavdar
Telerik team
answered on 19 Mar 2013, 12:28 PM
Hello,

Currently if the size of the chart image is greater than a certain value, during the report processing stage it is cached in the current system's temporary folder and after that deleted. In general you should not have any problems to access the temp folder as it is provided by the system but apparently there are cases in which the current process doesn't have enough permissions. This temp folder for the moment cannot be configured from the Telerik Reporting configuration section which can be considered as a bug.

The issue has been logged in our bug database and will be fixed for a subsequent version of the product. At the moment there is no exact time estimate for the fix so please keep an eye on the product's release notes after each release.

We are sorry for the inconvenience.

Kind regards,
Chavdar
the Telerik team

Telerik Reporting Q1 2013 available for download with impressive new visualizations. Download today from your account.

Tags
General Discussions
Asked by
Mark
Top achievements
Rank 1
Answers by
Mark
Top achievements
Rank 1
Steve
Telerik team
Herman
Top achievements
Rank 1
Chavdar
Telerik team
Share this question
or