The image is not found - Getting error for Memebership protected chart pages


  • I have a website utlizing ASP.NET Membership feature and recently wanted to add some chart functionality to it. Unfortunately when I access 
    the page containing the charts it keeps throwing the following error message:

    [ArgumentException: The image is not found.]
    System.Web.UI.DataVisualization.Charting.ChartHttpHandler.ProcessSavedChartImage(HttpContext context
    ) +350
    context) +46
    System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

    The folder containing the chart page prevents any unauthenticated users from acceessing it. I found out that this probably
    causes the issue and so when I remove "deny anonymous access" from my web.config file and clean my cookies then the chart comes up ok.

    Here's what that file looks like:
    <deny users="?" />
    <allow users="*" />

    The problem is then to make the charts page work even if Membership protection is enabled.

    Does anybody know how to solve this issue?

    Monday, February 23, 2009 3:35 PM


All replies

  • Hi, please disable chart privacy protection (set  privateImages=false in your web.config). Could you please share what type of authentication do you use?
    We will investigate this issue.

    Monday, February 23, 2009 11:57 PM
  • We are using Forms authentication in our application.

    I've just tried setting privateImages to false in the web.config file and this doesn't solve the issue I'm afraid. However I have found another way to work around this problem, which actually is a more suitable solution for us since our application is AJAX driven. So what I've done is I set up a generic handler page, which simply creates a dynamic chart, saves its image to a memory stream object and then sends it as a binary response to the client. This way I don't have to rely on the ChartHttpHandler and of course I don't get to see any error messages either. As an additional benefit there is now only one http request made when downloading the chart which also makes the user experience a little bit better.

    Nevertheless I am still interested in solving the initial issue, so if anybody has any ideas how to fix this please let me know.

    Wednesday, February 25, 2009 3:53 PM
  • We logged a bug for the original issue and the fix should be available in the .NET Framework 4.0.


    Monday, March 02, 2009 11:42 PM