Results 1 to 10 of 10

Hybrid View

  1. #1
    Member
    Join Date
    Feb 2009
    Location
    KL
    Posts
    29
    Quote Originally Posted by DarioCrivelli
    If the Web Server is on www.abc.com and Lightstreamer Server is on push.abc.com,
    you can make them communicate if you set the domain as abc.com.
    Note that you must set the domain through the library-provided setDomain method
    (follow the note in point 6 of GETTING_STARTED.TXT);
    I can't find the call in your code snippet.

    If you use the same host for both servers, with different ports,
    there is no domain setting that works on both IE and FF;
    if you don't set the domain at all (or call setDomain(null) ), this works only in IE.
    According to the above, in the setDomain docs, we claim that we don't support the case for production scenario.
    Thanks Dario, I am now trying to set up the lightstreamer server on another host which is different with the web server. But due to some network problem I can't access it at the moment. I update here later on any updates.

    Just that there is an issue which our team is more concerning is the firefox issue. We are wondering why the same push page able to run on the IE but not in firefox. I have posted on the first post in this thread.

    Thanks

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan, Italy
    Posts
    521
    Security restrictions concerning cross-frame and cross-domain communication may be slightly different across different browsers. But if you follow the instructions provided in our documentation carefully, we guarantee a consistent behavior across all browsers.

  3. #3
    Member
    Join Date
    Feb 2009
    Location
    KL
    Posts
    29
    Hi Dario,

    I have deploy the Lightstreamer server to another host which is different with the web server. The Lighstreamer server using the domain gts.vcb.com; while the web server using www.vcb.com. I set the domain using setDomain method and set the pushHost as follow:
    Code:
            var lsPage = new PushPage();
    	var debugAlerts = true;
    	var remoteAlerts = false;
    	var pushHost = null;
    	var pushPort = 3633;
    
    	debugAlerts = false;
    	remoteAlerts = true;
    	pushHost = "gts.vcb.com";	
    
    	lsPage.context.setDomain("vcb.com");
    	lsPage.context.setDebugAlertsOnClientError(debugAlerts);
    	lsPage.context.setRemoteAlertsOnClientError(remoteAlerts);
    	
    	lsPage.onEngineCreation = function(lsEngine) {
    		lsEngine.context.setDebugAlertsOnClientError(debugAlerts);
    		lsEngine.context.setRemoteAlertsOnClientError(remoteAlerts);
    
    		lsEngine.connection.setLSHost(pushHost);
    		lsEngine.connection.setLSPort(pushPort);
    		lsEngine.connection.setAdapterName("RBMS");
    		
    		lsEngine.policy.setMaxBandwidth(200);
    		lsEngine.policy.setIdleTimeout(30000);
    		lsEngine.policy.setPollingInterval(10000);
    
    		//lsEngine.onStatusChange = ChangeWindowStatus;
    		lsEngine.changeStatus("STREAMING");
    	}
    		
    	lsPage.bind();
    	lsPage.createEngine("HelloWorldApp","LS","SHARE_SESSION");
    But the push page still having the connection problem. The browser's status bar shows "Lightstreamer is disconnected" and the server see no response. I am still wondering how to connect it with two different host. Please correct me if I'm wrong. Thank you.

  4. #4
    Member
    Join Date
    Feb 2009
    Location
    KL
    Posts
    29
    I have added the lsPage.context.setDomain() on the engine configuration, and the push page is able to open with firefox now but I am not sure whether I miss something or what, the lsPage.context.setDomain() seems doesn't work on IE browser and prompt me the following message while connecting:

    1: 17:43:21,255 ER bind Unable to find the Engine. Retrying. If the problem persists, please check your configuration.

    Therefore I have added the browser detection in the script and call the seDomain method accordingly. Both IE and firefox are working now.

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

    which hostname do you use on the browser address bar to reach your page?
    please read setDomain documentation and check the Known Browser Issue section of the forum.
    Following our guidelines you should be able to run your application without any browser detection code.

  6. #6
    Member
    Join Date
    Feb 2009
    Location
    KL
    Posts
    29
    Hi Mone,

    Maybe I have miss something because the previous issue only happened on the same host architecture on our testing server. When I deploy it on the separate host architecture (different host of Lightstreamer server and web server), it works on both IE and Firefox browser.

    Quote Originally Posted by Alessandro
    Security restrictions concerning cross-frame and cross-domain communication may be slightly different across different browsers. But if you follow the instructions provided in our documentation carefully, we guarantee a consistent behavior across all browsers.
    the separate two server to two different host issue is solve, it happen because of the setDomain command missing, I left out this command line previously . Currently the issues are done but I will go through lot more testing again anyway.

    Thanks a lot for all the information.

 

 

Similar Threads

  1. Replies: 3
    Last Post: November 14th, 2011, 09:33 AM
  2. Connect to LightStreamer with NodeJS
    By afshinmeh in forum Client SDKs
    Replies: 1
    Last Post: October 6th, 2011, 06:31 PM
  3. Replies: 2
    Last Post: August 22nd, 2011, 08:25 AM
  4. RTD Demo will not connect to Lightstreamer Server
    By krohnjw in forum Client SDKs
    Replies: 23
    Last Post: February 8th, 2011, 01:47 PM
  5. Cannot connect to 6661,2,3 ports
    By ap7256 in forum Adapter SDKs
    Replies: 3
    Last Post: October 23rd, 2007, 10:02 AM

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 12:10 PM.