Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Oct 2007
    Location
    Chattanooga
    Posts
    12

    ASP.NET error.Please Help

    I am a new to lightstreamer. I developing a .ASPX page to receive stream data from JMS.
    These are the steps I am following, but I get the error

    "ER add Table Cant add table is PusgPage is not bound. Please call the bind() method of PushPage before adding tables"

    Please tell me what I am doing wrong.


    1) open a aspx project.
    2) This is my code for the default.aspx page.

    3) I publish this website to c:\inetpub\wwwwroot.

    4) My lightsreamer.conf has the http port as 80

    5) when I use the URL http://localhost/AMSDemo/Default.aspx, i get the above error.
    Please help


    <%@ Page Language="VB" AutoEventWireup="true" CodeFile="Default.aspx.vb" Inherits="_Default" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
    <title>Dataware AJAX Messaging Service Demo</title>
    <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
    <script language="JavaScript" src="ls/lscommons.js"></script>
    <script language="JavaScript" src="ls/lspushpage.js"></script>
    <script language="JavaScript">

    ///////////////////block escape key
    document.onkeydown = checkEscape;
    document.onkeypress = checkEscape;
    function checkEscape(e) {
    if(!e) e = event;
    if(e.keyCode == 27) return false;
    }

    //////////////////PushPage/Engine Config

    var lsPage = new PushPage();
    var debugAlerts = true;
    var remoteAlerts = false;
    var pushHost = "localhost";

    lsPage.context.setDomain(localhost);
    lsPage.context.setDebugAlertsOnClientError(debugAl erts);
    lsPage.context.setRemoteAlertsOnClientError(remote Alerts);

    lsPage.onEngineCreation = function(engRef) {
    engRef.context.setDebugAlertsOnClientError(debugAl erts);
    engRef.context.setRemoteAlertsOnClientError(remote Alerts);

    engRef.policy.setMaxBandwidth(30);
    engRef.policy.setIdleTimeout(30000);
    engRef.policy.setPollingInterval(1000);

    engRef.connection.setLSHost(pushHost);
    engRef.connection.setLSPort(80);
    engRef.connection.setAdapterName("STOCKJMS");

    engRef.changeStatus("STREAMING");
    }

    lsPage.bind();
    lsPage.createEngine("SLEngine","ls/","SHARE_SESSION");



    </script>
    </head>
    <body>
    <table class="demoTitle" style="width:100%">
    <tr>
    <td><img style="border-width:0" src="images/TRO.gif" /> </td>
    <td><div class="demoTitle">Lightstreamer ASP.NET AJAX Demo With Datatware</div></td>

    </tr>
    </table>
    <form id="form1" runat="server">



    <table style="width:100%">



    <tr>
    <td class="stockTD"><div source="lightstreamer" table="1" item="1" field="1">-</div></td>
    <td class="stockTD"><div source="lightstreamer" table="1" item="1" field="2">-</div></td>
    <td class="stockTD"><div source="lightstreamer" table="1" item="1" field="3">-</div></td>
    </tr>


    <script language="JavaScript">

    var lsTable = new OverwriteTable(null, null, "MERGE");
    lsTable.setRequestedMaxFrequency(1);
    lsTable.setSnapshotRequired(true);
    lsPage.addTable(lsTable,"1");
    </script>

    </table>



    </form>
    </body>
    </html>

  2. #2
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    Hi,

    3) I publish this website to c:\inetpub\wwwwroot.

    5) when I use the URL http://localhost/AMSDemo/Default.aspx, i get the above error.
    I assume that "http://localhost/AMSDemo/Default.aspx" is a typo as this url does not have a port and you said you have Lightstreamer on port 80 (so your IIS must listen to a different port)

    If you're using two servers (ie Lightstreamer + Web Server) you can no longer use "localhost" to reach your pages but you should use a complete machine name (e.g.: mypc.mydomain.com) and your code should change accordingly:


    Btw your error does not seem to be related to this problem. Maybe your problem is the following line:



    do you have a variable called localhost? If not this line will throw an exception so that the entire block is skipped (including the bind call) and the addTable (that's in another block) is executed before the bind as the message states.

    HTH

  3. #3
    Member
    Join Date
    Oct 2007
    Location
    Chattanooga
    Posts
    12

    That helped

    It works now. Thank you so much. I really appreciate it.

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 05:59 PM.