Login  
Search All Forums
Dart Home | PowerWEB LiveControls for ASP.NET | Custom Development Reply | PowerWEB LiveControls for ASP.NET Topics | Forums   
AuthorForum: PowerWEB LiveControls for ASP.NET
Topic: LiveControl Events lost somewhere
reinhard_aut

From: Vienna, Austria
Posts: 4
Member Since: 09/16/08
posted September 16, 2008 9:48 AM

We have been developing a new intranet application for more than a year and we are now after the first tests facing the problem, that our system is still very sensible against "normal" users, who do not handle our application with care, but double click instead of single click, are impatient and therefore producing events, before the previous event handling had been finished.

Therefore we have to take care, that events are stopped from being executed at the wrong time doing everything on our own, or rely on the system especially the LiveControls, that every event is handled properly and execution order of the fired events is kept, that each event is fired, and there is no data loss between the first and the last event etc. I thought, that LiveControls in its standard version are prepared to handle the problem, but at least in our configuration, they can't do so now.

We are working with VS2005 in C# (.Net Framework 2.0) with aspx and dlls and are using LiveControls Version 1.5.3.

And here is the problem, which I can reproduce with the enclosed small Website:
Our system handles Change events on the server, save the information in DataObjects and format them to send them back to the user interface, there are a lot of other tasks, so it is a bit time consuming, what's happening on the server on each request. I have simulated this with the sample application (Many Textcontrols, change of the content on the aspx-Code behind page sent back to the client, Sleep to simulate time consuming tasks.

If you enter data very fast (1 TAB 2 TAB 3 TAB 4 TAB ...), you might see - depending on speed and as a matter of chance, more or less amounts with added ".00" the other stay as they are, so more or less events are lost.

I have included a tracing in the Session, to see the events handled and their execution order. This leads to the assumption, that the requests are lost, before they come to the server, also I cannot explain, why every request comes twice.

When I use blocking=true the fast "1 TAB 2 TAB 3 TAB 4 TAB ..." is not possible, there is a bad side effect, that focus is lost somewhere and I can still produce the same problem by enter 1 - click in the next field - enter 2 - click in the third field - enter 3 ... and so on quickly.

Changing ViewStateCacheEnabled doesn't help too as expected, because events seem to be lost before coming to the server.

Enclosed you will find the main files of the website. Please help! Thank you very much in advance!

Sincerely,
Reinhard Hoefler
reinhard_aut

From: Vienna, Austria
Posts: 4
Member Since: 09/16/08
posted September 16, 2008 9:49 AM

The Default.aspx file:
----------------------------------------------------------------------------------
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register Assembly="Dart.PowerWEB.LiveControls" Namespace="Dart.PowerWEB.LiveControls"
  TagPrefix="cc1" %>

<!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>Unbenannte Seite</title>
</head>
<body>
  <form id="form1" runat="server">
  <div>
  <br /><cc1:LiveTextBox ID="txt_a" blocking="false" runat="server" UpdateAll="false" OnTextChanged="Control_Changed"></cc1:LiveTextBox>
  <br /><cc1:LiveTextBox ID="txt_b" blocking="false" runat="server" UpdateAll="false" OnTextChanged="Control_Changed"></cc1:LiveTextBox>
  <br /><cc1:LiveTextBox ID="txt_c" blocking="false" runat="server" UpdateAll="false" OnTextChanged="Control_Changed"></cc1:LiveTextBox>
  <br /><cc1:LiveTextBox ID="txt_d" blocking="false" runat="server" UpdateAll="false" OnTextChanged="Control_Changed"></cc1:LiveTextBox>
  <br /><cc1:LiveTextBox ID="txt_e" blocking="false" runat="server" UpdateAll="false" OnTextChanged="Control_Changed"></cc1:LiveTextBox>
  <br /><cc1:LiveTextBox ID="txt_f" blocking="false" runat="server" UpdateAll="false" OnTextChanged="Control_Changed"></cc1:LiveTextBox>
  <br /><cc1:LiveTextBox ID="txt_g" blocking="false" runat="server" UpdateAll="false" OnTextChanged="Control_Changed"></cc1:LiveTextBox>
  <br /><cc1:LiveTextBox ID="txt_h" blocking="false" runat="server" UpdateAll="false" OnTextChanged="Control_Changed"></cc1:LiveTextBox>
  <br /><cc1:LiveTextBox ID="txt_i" blocking="false" runat="server" UpdateAll="false" OnTextChanged="Control_Changed"></cc1:LiveTextBox>
  <br /><cc1:LiveTextBox ID="txt_j" blocking="false" runat="server" UpdateAll="false" OnTextChanged="Control_Changed"></cc1:LiveTextBox>
  <br /><cc1:LiveTextBox ID="txt_k" blocking="false" runat="server" UpdateAll="false" OnTextChanged="Control_Changed"></cc1:LiveTextBox>
  <br /><cc1:LiveTextBox ID="txt_l" blocking="false" runat="server" UpdateAll="false" OnTextChanged="Control_Changed"></cc1:LiveTextBox>
  <br /><cc1:LiveTextBox ID="txt_m" blocking="false" runat="server" UpdateAll="false" OnTextChanged="Control_Changed"></cc1:LiveTextBox>
  <br /><cc1:LiveTextBox ID="txt_n" blocking="false" runat="server" UpdateAll="false" OnTextChanged="Control_Changed"></cc1:LiveTextBox>
  <br /><cc1:LiveTextBox ID="txt_o" blocking="false" runat="server" UpdateAll="false" OnTextChanged="Control_Changed"></cc1:LiveTextBox>
  <br /><cc1:LiveTextBox ID="txt_p" blocking="false" runat="server" UpdateAll="false" OnTextChanged="Control_Changed"></cc1:LiveTextBox>
  <br /><cc1:LiveTextBox ID="txt_q" blocking="false" runat="server" UpdateAll="false" OnTextChanged="Control_Changed"></cc1:LiveTextBox>
  <br /><cc1:LiveTextBox ID="txt_r" blocking="false" runat="server" UpdateAll="false" OnTextChanged="Control_Changed"></cc1:LiveTextBox>
  <br /><cc1:LiveTextBox ID="txt_s" blocking="false" runat="server" UpdateAll="false" OnTextChanged="Control_Changed"></cc1:LiveTextBox>
  <br /><cc1:LiveTextBox ID="txt_t" blocking="false" runat="server" UpdateAll="false" OnTextChanged="Control_Changed"></cc1:LiveTextBox>
  <br /><cc1:LiveTextBox ID="txt_u" blocking="false" runat="server" UpdateAll="false" OnTextChanged="Control_Changed"></cc1:LiveTextBox>
  <br /><cc1:LiveTextBox ID="txt_v" blocking="false" runat="server" UpdateAll="false" OnTextChanged="Control_Changed"></cc1:LiveTextBox>
  <br /><cc1:LiveTextBox ID="txt_w" blocking="false" runat="server" UpdateAll="false" OnTextChanged="Control_Changed"></cc1:LiveTextBox>
  <br /><cc1:LiveTextBox ID="txt_x" blocking="false" runat="server" UpdateAll="false" OnTextChanged="Control_Changed"></cc1:LiveTextBox>
  <br /><cc1:LiveTextBox ID="txt_y" blocking="false" runat="server" UpdateAll="false" OnTextChanged="Control_Changed"></cc1:LiveTextBox>
  <br /><cc1:LiveTextBox ID="txt_z" blocking="false" runat="server" UpdateAll="false" OnTextChanged="Control_Changed"></cc1:LiveTextBox>
  <br /><cc1:LiveButton OnClick="ShowTrace" blocking="false" runat="server" />
  <br /><cc1:LiveTextBox ID="txt_trace" blocking="false" runat="server" UpdateAll="false" OnTextChanged="Control_Changed"></cc1:LiveTextBox>
  </div>
  </form>
</body>
</html>
reinhard_aut

From: Vienna, Austria
Posts: 4
Member Since: 09/16/08
posted September 16, 2008 9:50 AM

The Code behind page Default.aspx.cs:
--------------------------------------------------

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Dart.PowerWEB.LiveControls;
using System.Threading;

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

  }

  public void Control_Changed(object sender, EventArgs e)
  {
    string sControl;

    sControl = ((Control)sender).ID;

    if (Session.Contents["CustomTracing"] == null)
    {
      Session.Contents["CustomTracing"] = "";
    }

    lock (Session.Contents["CustomTracing"])
    {
      Session.Contents["CustomTracing"] += "|" + sControl;
    }

    ((LiveTextBox)this.FindControl(sControl)).Text = ((LiveTextBox)this.FindControl(sControl)).Text + ".00";
    Thread.Sleep(500);
  }

  public void ShowTrace(object sender, EventArgs e)
  {
    ((LiveTextBox)this.FindControl("txt_trace")).Text = (string)Session.Contents["CustomTracing"];
  }
}
reinhard_aut

From: Vienna, Austria
Posts: 4
Member Since: 09/16/08
posted September 16, 2008 9:50 AM

The Web.config:
----------------------------------------------
<?xml version="1.0"?>
<!--
  Hinweis: Alternativ zur manuellen Bearbeitung dieser Datei
  können Sie auch mit dem Webverwaltungstool die Einstellungen
  für Ihre Anwendung konfigurieren. Verwenden Sie die Option
  "Website->ASP.NET-Konfiguration" in Visual Studio. Eine
  vollständige Liste aller Einstellungen und Kommentare befindet
  sich in "machine.config.comments", im Allgemeinen unter "\Windows\Microsoft.Net\Framework\v2.x\Config".
-->
<configuration>
<appSettings>
<add key="Dart.PowerWEB.LiveControls.ViewStateCacheEnabled" value="true"/>
<add key="Dart.PowerWEB.LiveControls.ViewStateCacheTimeout" value="1200"/>
<add key="Dart.PowerWEB.LiveControls.Debug" value="false"/>
</appSettings>
<connectionStrings/>
<system.web>
<pages enableSessionState="true"/>
<httpHandlers>
<add verb="*" path="Dart.PowerWEB.LiveControls.GetResource.aspx" type="Dart.PowerWEB.LiveControls.ResourceHttpHandler,Dart.PowerWEB.LiveControls"/>
</httpHandlers>
<httpModules>
<add name="CallbackManager" type="Dart.PowerWEB.LiveControls.CallbackManager,Dart.PowerWEB.LiveControls"/>
</httpModules>
<!--
      Legen Sie beim Kompilieren debug="true" fest, um
      Debugsymbole in die kompilierte Seite einzufügen.
      Da dies die Leistung beeinträchtigt, sollte der
      Wert nur beim Entwickeln auf "True" gesetzt werden.
    -->
<compilation debug="true">
<assemblies>
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="VSLangProj, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
</assemblies>
</compilation>
<!--
      Der Abschnitt <authentication> ermöglicht die Konfiguration
      des Sicherheitsauthentifizierungsmodus, mit dem
      ASP.NET eingehende Benutzer identifiziert.
    -->
<authentication mode="Windows"/>
<!--
      Der Abschnitt <customErrors> ermöglicht die Konfiguration
      der Vorgehensweise bei unbehandelten Fehlern während
      der Anforderungsausführung. Insbesondere können
      Entwickler HTML-Fehlerseiten konfigurieren, die anstelle
      einer Fehlerstapelüberwachung angezeigt werden.

    <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
      <error statusCode="403" redirect="NoAccess.htm" />
      <error statusCode="404" redirect="FileNotFound.htm" />
    </customErrors>
    -->
</system.web>
</configuration>
Jamie Powell (Admin)

From: Rome, NY USA
Posts: 448
Member Since: 03/13/07

Extra Support Options
Custom Application Development

posted September 16, 2008 12:47 PM

Hello, this issue needs to be handled through our administrative procedures prior to response. Please contact sales@dart.com directly regarding this issue. Thank you.
Reply | PowerWEB LiveControls for ASP.NET Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX