Results 1 to 4 of 4

Hybrid View

  1. #1
    Member
    Join Date
    Jul 2011
    Location
    Monterrey
    Posts
    6

    Problem running LS Server and Web Server (IIS) on same machine

    Hi, I cant get the application to run on a IIS Web Server.
    Deploying my code to the server, makes the IE and Firefox browser to have issues with (I believe) Cross-Domain access.
    After reading the HOW_TO_DEPLOY_ON_YOUR_WEB_SERVER.txt, searching through the forum and many configuration tests, I can't fix it.
    This is my scenario:

    I can run my code succesfully on my developer machine, where I run a .NET Adapter and LS Server on the same PC, and then, in another instance of localhost (port 2027) I run my .NET Web client which connects to the Server.
    I set:
    pushPage.context.setDomain("localhost");
    lsEngine.connection.setLSHost("localhost");
    lsEngine.connection.setLSPort(8080); //Default of the LS Server Installation
    And it works. Page is displayed and information updated.

    The problem comes when I change to another computer (lab-PC).
    I installed LS Server on the lab-PC and ran the Basic-Stock Demo succesfully.
    I ran the .NET Adapter and it shows on the LS Server command window that it succesfully connects to it.
    I deploy the .NET Web Client on a IIS web server. Changing the values to:
    pushPage.context.setDomain("kdes.com");
    lsEngine.connection.setLSHost("kdes.com");
    lsEngine.connection.setLSPort(8080);

    On my host file I have:
    192.168.240.97 kdes.com #lab-PC IP
    (Since, I'm running both LS Server and Web Server on the same machine.)

    I access the application successfully via http://kdes.com/Lightstreamer/Default.aspx,
    it shows the page, but it doesnt update.
    The problem is that in my web Browser (firefox) I get an issue about:

    Warning: An unbalanced tree was written using document.write() causing data from the network to be reparsed. For more information https://developer.mozilla.org/en/Opt...lative_Parsing
    Source File: http://kdes.com/Lightstreamer/LS/lse...gAlerts=false&
    Line: 89

    In IE i get "Permission Denied" lsEngine.html, which makes "lsEngine is null" error.

    As I stated before, I've made several tests but I may be missing something which I can't figure out what it is. Any help will be apreciated.

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,090
    As a general rule, running the Web Server and LS Server on different ports on the same host is exposed to cross domain access issues because of the browser-enforced restrictions. See here our findings so far.
    In particular, are you using IE older than version 8?

    As far as you are only testing, you could setup a work around by setting longer hostnames, like "www.kdes.com" and "push.kdes.com" through the "hosts" file.

    The error message on Firefox is new for us and it is unclear whether or not it can be related with your particular scenario. Please keep us informed if you see it again with other hostname configurations.

    By the way, what do you mean by ".NET Web Client"? Do you just mean that the web pages are originated from aspx pages?

  3. #3
    Member
    Join Date
    Jul 2011
    Location
    Monterrey
    Posts
    6
    Thanks for the tips, having the extended name "www.kdes.com" worked.

    Running the servers on lab-PC and testing it with Firefox 5 worked, also worked with IE 8 but not with IE 7 (as I read your post, it was somewhat expected for older versions of IE8).

    By the time I deploy the solution to a real web server, different machine from LS Server will the versions of IE be an issue? Or are these issues are related only to having both LS Server and Web server on same machine?

    My final configuration (for test purposes) was this one:
    pushPage.context.setDomain("www.kdes.com");
    lsEngine.connection.setLSHost("www.kdes.com");
    lsEngine.connection.setLSPort(8080);

    On my lab-PC hosts file I set:
    192.168.240.97 www.kdes.com #lab-PC IP

    And on a different machine (other-PC) that I want to see the webpage:
    192.168.240.97 www.kdes.com #lab-PC IP
    on its hosts file.

    I tried with the different domains "www.kdes.com" and "push.kdes.com" but it kept giving me document.domain error, so i tried with just "www.kdes.com".
    The firefox warning "Unbalanced tree (...) causing data to be reparsed" keeps showing, but with no impact as far as i can tell.

    Ps.- Yes, by ".NET Web Client" I meant the web pages are originated from aspx pages.

    *EDIT*.- I had an unexpected issue while subscribing an item with an asterisk ( "*" )in its name. I'm not completely sure if the problem was with the adapter, the LS Server or the web page, but at the moment I can't update elements with that character on the item name. Have you experience this before?



    Thanks for the quick reply.

  4. #4
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,090
    If your final choice for the hostnames is the canonical one, that is "www.kdes.com" and "push.kdes.com",
    you can achieve compatibility with all browsers by setting just "kdes.com" as the common subdomain through setDomain().
    I suggest you retrying that in your tests with the "hosts" file.

    Even in your temporary test configuration, with "www.kdes.com" for both servers (and different ports), setting "kdes.com" in setDomain() should improve the compatibility.

    About the Firefox warning, do you mean that you only see it if you open the error console?

    Finally, about the issue with the asterisk, I confirm that we don't support all characters in item names. The specification (not very visible indeed) is here.
    You are supposed to have received a "client error" associated with your subscription attempt.

 

 

Similar Threads

  1. Replies: 1
    Last Post: September 18th, 2009, 10:13 AM
  2. LSClient Not giving any error if the LS Server is not running
    By shreyaspurohit in forum Client SDKs
    Replies: 6
    Last Post: December 15th, 2008, 02:27 PM
  3. Problem with stopping LS server in Linux
    By quanhm in forum General
    Replies: 1
    Last Post: November 16th, 2007, 12:32 PM
  4. Replies: 1
    Last Post: November 5th, 2007, 02:36 PM
  5. Problem connecting GI to LS server
    By camerone in forum Client SDKs
    Replies: 1
    Last Post: August 20th, 2007, 03:37 PM

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 03:38 PM.