Component Enabler ASP.NET Generator

ASP.NET Web Forms Architecture

The following diagram describes how Component Enabler for the Microsoft .NET Framework, and the IIS server use the generated ASP.NET Web Forms to provide a tailored client interface.

Figure 32. Process flow using generated ASP.NET Web Forms

Process flow using generated ASP.NET Web Forms

When a client browser connects for the first time to the virtual directory of the Microsoft IIS server, the server tries to locate the file Global.asax, which contains session startup and shutdown logic for the ASP.NET application. At the start of a new session, the server executes the Session_OnStart() routine, which creates an instance of the LINCEnvironment object.

The LINCEnvironment object is used to connect to the system, which returns a fireup Ispec. The Session_OnStart routine then stores the LINCEnvironment object in the Session object maintained by the IIS server for that browser, and redirects processing to the ASP.NET Web Form associated with the fireup Ispec.

The ASP.NET Web Form is specific to the Ispec, and contains information about the content and presentation of each field. When the ASP.NET Web Form is loaded, the Page_Load() method is called to process the Ispec data received from the Host system. The LINCEnvironment object is retrieved from the Session object for the browser, and is used to retrieve all the data for the fields, and the status line. When the Page_Load() processing completes, the ASP.NET Web Form passes the generated HTML Form to the client's browser.

The browser reads the HTML to present an interactive GUI Form for the user.

When the user completes the transaction, the Form data is transmitted to the IIS server and the corresponding ASP.NET Web Form is loaded. The Page_Load() method is called again to process the request from the user. The ASP.NET Web Form detects that a PostBack has occurred, which means the user is sending data for the previously loaded form. This time, the ASP.NET Web Form retrieves the LINCEnvironment object from the Session object, gathers all the field data sent from the Browser and calls Component Enabler methods to set the Ispec data.

Using Component Enabler, the data is sent to the Host system, which responds with an Ispec. The name of the Ispec is retrieved (which might be different from the original Ispec) and processing is redirected to the individual ASP.NET Web Form for that Ispec.

The process is then repeated.

Notes:

  • The ASP.NET Session usually has an idle timeout of 20 minutes. This can be controlled by the “timeout” setting in the “Session State” section of Web.Config for the application. If no activity is detected for a particular user within 20 minutes, the Session_End routine in Global.asax is called. This closes the user's session and release the LINCEnvironment object. If the user attempts to submit a Form after their session has been closed, they are presented with a timeout form called Timeout.htm. The user can then choose to re-establish the session or close the Browser window. Note that any context that was established with the host system in the previous session is lost.

  • All Session related options can be configured in the application's Web.Config file. It is not necessary to edit Global.asax and recompile the application. By default, the LINCEnvironment object uses the Component Enabler Runtime for .NET. The Java-based runtime is also available if required, and can be specified using the key called “LINCEnvironmentProgId” as described in Web.Config.