Welcome Guest Search | Active Topics | Sign In | Register

Callbacks - FireFox Options
Mike Eyal
Posted: Sunday, December 6, 2009 9:07:49 PM
Rank: Member
Groups: Member

Joined: 10/19/2009
Posts: 11
Hi there,

I see there was a similar thread back in October, with the issue I am having with the Callback Panel, but I am unable to follow the fix.
The problem I am having occurs in FireFox 3.5, when I change pages in our application before all callback panels have finished updating in the previous page - I get an error message box saying the Callback Panel has failed due to a server side exception, the application continues to run though.
Do you have a fix - it would much appreciated.

Cheers

Mike
eo_support
Posted: Sunday, December 6, 2009 9:52:59 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Most of the time this is a user code error. If you use IE instead of FireFox and run into the same problem, you can click "OK" and IE should be able to display you the real error message, which usually is an exception thrown somewhere in your code. FireFox is able to detect this error, but it is not able to display the real error message.

If the problem only occurs on FireFox, then it can be something else. In that case you can run your server side code under a debugger (for example, with Visual Studio) and then set Visual Studio to catch any exception (go to Debug -> Exceptions, check "Throw" for "Common Language Runtime Exception") and as soon as the error occurs, Visual Studio should be able to catch it. That should tell you what the error really is.

If neither shows you any information or it shows you information but it appears to be a problem with our product, please try to isolate the problem into a separate test page/project and we will be happy to take a look. Please make sure the test page/project only contains code that is needed to reproduce the problem and runs.

Thanks!
Mike Eyal
Posted: Wednesday, December 9, 2009 6:07:11 PM
Rank: Member
Groups: Member

Joined: 10/19/2009
Posts: 11
Hi there,

Thank you for your reply - I have managed to isolate the problem with a test case as outlined below. IE is fine, FireFox 3.5 is not.

Code: HTML/ASPX
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="EOCallbackTest._Default" %>

<%@ Register Assembly="EO.Web" Namespace="EO.Web" TagPrefix="eo" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        
        <eo:CallbackPanel ID="CallbackPanel1" runat="server" Height="150px" 
            Width="200px" 
            LoadingHTML="'loading.gif' style='width: 64px; height: 64px' />" 
            onexecute="CallbackPanel1_Execute" ChildrenAsTriggers="True">
        <asp:Button ID="btnStart" runat="server" Text="Start Callback" />
            
        </eo:CallbackPanel>
    </div>
    <asp:LinkButton ID="LinkButton1" runat="server" PostBackUrl="Test1.aspx">Click this while Callback is executing</asp:LinkButton>
    
    </form>
</body>
</html>




Code: HTML/ASPX
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test1.aspx.cs" Inherits="EOCallbackTest.Test1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    Test page
    </div>
    </form>
</body>
</html>


Code: C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Threading;

namespace EOCallbackTest
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void CallbackPanel1_Execute(object sender, EO.Web.CallbackEventArgs e)
        {
            Thread.Sleep(15000);
        }
    }
}


I hope this helps

Cheers

Mike
eo_support
Posted: Wednesday, December 9, 2009 8:56:19 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

We have looked into the the issue and it appears to be a FireFox bug. Obviously FireFox is able to queue up new post back after existing post backs (through AJAX) if they all goes to the same page (it supposes to). However if the new post back goes to a different page, it cancels the previous AJAX post backs (which is OK) and notifies the underlying XMLHttpRequest object that the previous post back is "done" (which is not OK), which causes the error you saw. IE is able to correctly handle this situation correctly.

We will try to identify and handle this situation in our code and provide you an update build as soon as possible. In the mean time there are several workarounds for this issue:

1. The easiest way is to silence the error message. This particular situation is not a real problem so the message can be safely ignored. You can either set DebugLevel to 0 to silent all debug message or handle the CallbackPanel's ClientSideOnError to handle only this CallbackPanel's error message;

2. Avoid cross page postback if possible. The problem seems to be triggered by cross page postback;

3. Prevent new postbacks while callback is pending. You will need to handle the callback panel's ClientSideBeforeExecute and ClientSideAfterExecute to set/clear a flag so that you can check this flag later to determine whether the callback is in progress. You would then handle the form's onsubmit event to check this flag and return false if you see this flag is set;

Hope this helps.

Thanks
eo_support
Posted: Thursday, December 10, 2009 3:38:24 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

We have posted a new build that should address this issue. Please see your private messages for download location.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.