-
April 13th, 2015, 03:21 PM
#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
-
April 14th, 2015, 08:57 AM
#2
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
-
April 14th, 2015, 12:00 PM
#3
Hi Giuseppe,
thanks for your answers.
Originally Posted by
giuseppe.corti
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.
Originally Posted by
giuseppe.corti
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
-
April 15th, 2015, 08:56 AM
#4
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
-
April 15th, 2015, 10:52 AM
#5
Hi Giuseppe,
Originally Posted by
giuseppe.corti
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
-
April 16th, 2015, 08:53 AM
#6
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
-
By shabbirh in forum Client SDKs
Replies: 1
Last Post: April 23rd, 2013, 09:27 AM
-
By DarioCrivelli in forum Client SDKs
Replies: 0
Last Post: June 14th, 2007, 04:59 PM
-
By Alessandro in forum Client SDKs
Replies: 4
Last Post: May 4th, 2007, 12:07 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
All times are GMT +1. The time now is 05:44 PM.
Bookmarks