ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Error 800 - Partial Update Error
Posted by Luke Beuchat on May-02-2007 06:45
Attachments:
Hi Peter,

I seem to in getting an Error 800 - Partial Update Error when I am trying to post a Partial Update - see attached.

Just a few questions:

(1) What general causes this?

(2) How can I diagnose the problem

(3) How can I can this Error and display a friendly Message.

I am working in c#.

Thanks

Luke
Partial_Update_Error.gif

  Re: Error 800 - Partial Update Error
Posted by Peter Kwan on May-02-2007 14:02
Hi Luke,

The error means the browser sends a "partial update" request to the server (AJAX chart update), however, the server does not return a "partial update" response. Instead, it returns the things shown in the error message.

May you verify that your page is handling partial update correctly? For example, in ChartDirector sample code, the Page_Load code is something like:

//
// Page Load event handler
//
protected void Page_Load(object sender, EventArgs e)
{
    //
    // We need to handle the first chart request, partial update request (AJAX chart update) and
    // full page update
    //
    if (WebChartViewer.IsPartialUpdateRequest(Page)) {
        // *** Is a parial update request ***

        // The .NET platform will not restore the states of the controls before or during Page_Load,
        // so we need to restore the state ourselves
        WebChartViewer1.LoadViewerState();

        // Draw the chart in partial update mode
        processPartialUpdate(WebChartViewer1);

        // Output the chart immediately and then terminate the page life cycle.
        WebChartViewer1.PartialUpdateChart();
    } else if (IsPostBack) {
        // *** Is a full update request ***
        processFullUpdate(WebChartViewer1);
    } else {
        // *** Page is first accessed ***
        createFirstChart(WebChartViewer1);
    }
}


Note that if you need to support AJAX chart update, one thing the ASPX must do is to check if the request is a "full page request" (return the entire web page) or a "AJAX chart update" request (return part of a web page - such as a chart). If the code returns the entire web page for a "AJAX chart update" (which is expected only the updated chart), the error 800 will occur.

Hope this can help.

Regards
Peter Kwan

  Re: Error 800 - Partial Update Error
Posted by Luke Beuchat on May-18-2007 13:42
Hi Peter,

I have identified the issue.

The Code Behind page that receives teh response was throwing and exception.

Even though I was catching the exception it was still returning with the HTML.

Is it possible to catch the 800 error such that nothing is returned to the browser when an error occurs in the Code Behind page?

Thanks

Luke

  Re: Error 800 - Partial Update Error
Posted by Peter Kwan on May-18-2007 19:01
Hi Luke,

Normally, if a browser sends a request to a server, and the server does not return anything, the browser will treat it as an error. For example, if you enter a URL on the browser to a web site that does not exist, the browser will like times out and return an error message.

So in your case, even if there is nothing to output, you must still complete the life cycle of the page by calling WebChartViewer1.PartialUpdateChart().

I am not sure how you catch the exception and how do you handle it. If you catch the exception in Page_Load, then only Page_Load is affected, but the other ASP.NET events will work normally (PreRender, Render, ....), so there is still output. What you need to do is to call WebChartViewer1.PartialUpdateChart() to send a response to the partial chart update request and terminate the page life cycle.

So in summary, for partial chart update, please make sure you call WebChartViewer1.PartialUpdateChart() even if there is an exception.

Hope this can help.

Regards
Peter Kwan

  Re: Error 800 - Partial Update Error
Posted by Peter Kwan on May-18-2007 19:03
Hi Luke,

Normally, if a browser sends a request to a server, and the server does not return anything, the browser will treat it as an error. For example, if you enter a URL on the browser to a web site that does not exist, the browser will like times out and return an error message.

So in your case, even if there is nothing to output, you must still complete the life cycle of the page by calling WebChartViewer1.PartialUpdateChart().

I am not sure how you catch the exception and how do you handle it. If you catch the exception in Page_Load, then only Page_Load is affected, but the other ASP.NET events will work normally (PreRender, Render, ....), so there is still output. What you need to do is to call WebChartViewer1.PartialUpdateChart() to send a response to the partial chart update request and terminate the page life cycle.

So in summary, for partial chart update, please make sure you call WebChartViewer1.PartialUpdateChart() even if there is an exception.

Hope this can help.

Regards
Peter Kwan

  Re: Error 800 - Partial Update Error
Posted by Nicolas Juguet on Sep-30-2011 16:56
Hi Peter

Is the an answer for the point (3) raised here by luke.
I recieving such errors after login time out for instance and would rather having a custom error than the page code.

Thanks
Nicolas

  Re: Error 800 - Partial Update Error
Posted by Peter Kwan on Oct-01-2011 00:19
Hi Nicolas,

You may use JsChartViewer.serverErrorMsg to modify the error message. For example:

JsChartViewer.serverErrorMsg = "Login Session Timeout. Please Login Again.";

Hope this can help.

Regards
Peter Kwan