Jan 25, 2011, 1:25 PM
[CLOSED] Timeout - Transaction abortedafter 30 seconds
I tried to summarize my scenario
The method UpdateTimeStamp takes a long time to complete
Even if you set the timeout after 30 seconds the page times out
I discovered that the problem is not the Button1 the taskmanager but it crashes when running UpdateTimeStamp.
I also tried to stop my taskmanager
the question remains
This example works only if the session is empty
it's clear my problem?
This is the code:
The method UpdateTimeStamp takes a long time to complete
Even if you set the timeout after 30 seconds the page times out
I discovered that the problem is not the Button1 the taskmanager but it crashes when running UpdateTimeStamp.
I also tried to stop my taskmanager
the question remains
This example works only if the session is empty
it's clear my problem?
This is the code:
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Threading" %>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
Session["ok"] = "ppp";
}
protected void UpdateTimeStamp(object sender, DirectEventArgs e)
{
TaskManager1.StopAll();
System.Threading.Thread.Sleep(80000);
X.Msg.Notify("The Server Time is: ", DateTime.Now.ToLongTimeString()).Show();
}
protected void RefreshTime(object sender, DirectEventArgs e)
{
ServerTimeLabel.Text = DateTime.Now.ToString("HH:mm:ss") + Session.SessionID; ;
}
</script>
<!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 id="Head1" runat="server">
<title>DirectEvents Summary - Ext.NET Examples</title>
<link href="../../../../resources/css/examples.css" rel="stylesheet" type="text/css" /></head>
<body>
<form id="Form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server"></ext:ResourceManager>
<ext:Button ID="Button1" runat="server" Text="Click Me">
<DirectEvents>
<Click OnEvent="UpdateTimeStamp" Timeout="100000">
<EventMask ShowMask="true" />
</Click>
</DirectEvents>
</ext:Button>
<ext:Label ID="ServerTimeLabel" runat="server" /> <br />
<ext:TaskManager ID="TaskManager1" runat="server">
<Tasks>
<ext:Task Interval="1000">
<DirectEvents>
<Update OnEvent="RefreshTime"/>
</DirectEvents>
</ext:Task>
</Tasks>
</ext:TaskManager>
</form>
</body>
</html>