Jul 09, 2012, 7:34 PM
[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
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).
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
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]