[CLOSED] Handling Response Timeout

  1. #1

    [CLOSED] Handling Response Timeout

    Hi again,


    I would consider a server response longer timeout for, let me say, long requests.
    I'm not familiar with the timeout classes but I tried to do what follows:
    I tried defining
    [DirectMethod(Timeout = 60000)]
    but every time i run the code I get the comm. error always after 30 seconds circa

    Click image for larger version. 

Name:	Immagine.png 
Views:	172 
Size:	94.3 KB 
ID:	4454

    Furthermore,
    How could I handle the communication error to notify a custom message/action ?

    please consider the example below (one button: it is disabled after <n> seconds and change text).
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <script runat="server">
        [DirectMethod(Timeout = 60000)]
        protected void SleepTooMuch(object sender, DirectEventArgs e)
        {
            System.Threading.Thread.Sleep(55000);
            Button1.Text = "Wait time Expired";
            Button1.Disabled = true;
        }
    </script>
    <!DOCTYPE>
    <html>
    <head id="Head1" runat="server">
        <title>Response Example</title>
    </head>
    >
    <body>
        <form id="Form1" runat="server">
        <ext:ResourceManager ID="ResourceManager1" runat="server" />
        <ext:Button ID="Button1" runat="server" Text="Long OP" Width="200" >
            <DirectEvents>
                <Click OnEvent="SleepTooMuch">
    
                </Click>
            </DirectEvents>
        </ext:Button>
        </form>
    </body>
    </html>
    Thanks in advance
    Last edited by Daniil; Jul 11, 2012 at 11:26 AM. Reason: [CLOSED]
  2. #2
    Hi,

    Setting up the DirectMethod attribute for the DirectEvents handlers doesn't make any sense.

    You should set up the Timeout property for the DirectEvent.
    <Click OnEvent="SleepTooMuch" Timeout="60000">
    The default Timeout is 30000.

    How to set up globally.
    http://forums.ext.net/showthread.php?19763
    How could I handle the communication error to notify a custom message/action ?
    You can use the Failure handler of the DirectEvent. See also:
    http://forums.ext.net/showthread.php?17247
  3. #3
    Thanks again Daniil,

    is it available a full documentation for ver 2.0, as for 1.4, if not, is it in progress?
    bye
  4. #4
    Unfortunately, no. Please follow to get more details:
    http://forums.ext.net/showthread.php...ll=1#post77122
  5. #5
    thanks, thread can be closed
    bye

Similar Threads

  1. Replies: 0
    Last Post: Aug 05, 2012, 10:46 AM
  2. [CLOSED] Grid Error Handling
    By adelaney in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Jun 11, 2012, 8:37 PM
  3. [CLOSED] Store Exception Handling
    By peter.campbell in forum 1.x Legacy Premium Help
    Replies: 9
    Last Post: May 19, 2011, 3:35 PM
  4. [CLOSED] Global exception handling - wrong response or no failure
    By pschojer in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 13, 2010, 2:03 PM
  5. [CLOSED] Message Box event handling
    By Etisbew in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Aug 19, 2009, 12:52 PM

Tags for this Thread

Posting Permissions