Results 1 to 6 of 6
  1. #1

    Get datas from a financial server. .NET Client API

    Hello,

    I have some problems with connecting from my C#-program to a LightStreamer server.
    It is a financial value which I want to get from a website/server.
    The Website is http://www.zertifikate.commerzbank.d...m=TabPanel&c=0
    I look for the "Geld" and "Brief"-values which means Bid and Ask.

    I tried the following code:
    LightstreamerTest.txt

    I get always the error of an incorrect answer. I don't know if the PushServerUrl and/or the Adapter are correct. Is there a way to find this out? I hope anybody can help me. I spend to weeks on this problem and I don't know the further way.

    Excuse me, if my English is not so good.

    Best regards from Germany,
    Sven

  2. #2
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    587
    Hi Sven,

    The error "incorrect answer" refers to a syntactic rejection of the response sent to your client, that, at first sight, seems to me correct.
    The most likely reason could be that the server to which you are connecting is not a Lightstreamer server.

    Otherwise, if the target server is actually a Lightstreamer server, this could not be configured to handle the specific type of client, in your case .NET Client.
    Please, could you proceed with checks on the server side?

    Regards,
    Giuseppe

  3. #3
    Hi Giuseppe,

    thanks for your answers.

    Quote Originally Posted by giuseppe.corti View Post
    The error "incorrect answer" refers to a syntactic rejection of the response sent to your client, that, at first sight, seems to me correct.
    The most likely reason could be that the server to which you are connecting is not a Lightstreamer server.
    I know that the server is a Lightstreamer server, because of the website which appears by opening the https://warrantspushserver.commerzbank.de in the browser.

    Quote Originally Posted by giuseppe.corti View Post
    Otherwise, if the target server is actually a Lightstreamer server, this could not be configured to handle the specific type of client, in your case .NET Client.
    Please, could you proceed with checks on the server side?
    OK I had not known that this could be the problem. I don't have access to the server, so i can't give you some server side informations. I have thought that I can get the same values in my program like my browser.

    I think that is the request of the browser:


    POST http://warrantspushserver.commerzban...ate_session.js

    Request-Header:
    Host: warrantspushserver.commerzbank.de
    User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Language: de,en-US;q=0.7,en;q=0.3
    Accept-Encoding: gzip, deflate
    Content-Type: application/x-www-form-urlencoded; charset=UTF-8
    Referer: http://www.zertifikate.commerzbank.d...m=TabPanel&c=0
    Content-Length: 180
    Origin: http://www.zertifikate.commerzbank.de
    Connection: keep-alive
    Pragma: no-cache
    Cache-Control: no-cache

    Request-Body:
    LS_phase=1901&LS_domain=commerzbank.de&LS_cause=ne w.api&LS_polling=true&LS_polling_millis=0&LS_idle_ millis=0&LS_client_version=6.0&LS_adapter_set=Prox yIcomAdapter&LS_container=lsc&

    answer:
    var myEnv = lsc;
    var phase = null;
    function setPhase(ph) {
    phase = ph;
    }

    function start(sID, addr, kaMs, reqLim, srv) {
    LS_window.LS_e(1, phase, sID, addr, kaMs, reqLim, srv);
    }

    function loop(holdMs) {
    LS_window.LS_e(2, phase, holdMs);
    }
    setPhase(1901);start('S65b3555d27bc3eeT5606521', null, 0, 50000, 'Lightstreamer HTTP Server');loop(0);



    I hope you can find more than I.

    Best regards.
    Sven

  4. #4
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    587
    Hi Sven,

    Given the type of error and the fact that the same connection parameters work in JavaScript, it is almost certain that the problem is the server not configured to accept .NET clients.

    Regards,
    Giuseppe

  5. #5
    Hi Giuseppe,

    Quote Originally Posted by giuseppe.corti View Post
    Given the type of error and the fact that the same connection parameters work in JavaScript, it is almost certain that the problem is the server not configured to accept .NET clients.
    so you have tried my parameters in JavaScript ? If that is the case, I should try to embed JavaScript in my C# code.

    I will answer again with my working code, if it works...

    Best Regards,
    Sven

  6. #6
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    587
    Hi Sven,

    No, I have not tried that JavaScript code directly, but I assume that it works because the web page works.

    Regards,
    Giuseppe

 

 

Similar Threads

  1. Replies: 1
    Last Post: April 23rd, 2013, 10:27 AM
  2. Using the .NET client API behind a proxy
    By DarioCrivelli in forum Client SDKs
    Replies: 0
    Last Post: June 14th, 2007, 05:59 PM
  3. .NET Client API Released
    By Alessandro in forum Client SDKs
    Replies: 4
    Last Post: May 4th, 2007, 01:07 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 09:56 PM.