API Support Forum
OEC API > API Support > PriceStream disconnected
Author Topic: PriceStream disconnected
(4 messages, Page 1 of 1)
Moderators: VPfau
ACunningham
Posts: 3
Joined: Feb 02, 2011


Posted: Jun 29, 2011 @ 08:53 AM             Msg. 1 of 4
Hello,

I have the following problem: We use the production environment (with the dll-files from your emaple applications) with a correct login credentials (we can use them in the official platform and everything works fine). In our system a connection to OEC API can be established (for example we can seen the states of our accounts), but we can not get any DOM data.We use the standard way like the following:

oecClient.SubscribeDOM(oecClient.Contracts[mnemonic]);

I guess that it is OK. But there is a stragne error in the OEC API log. Here are the first lines of it (next lines are the same because of a repetition of the mentioned ones):

21:25:32.564 Dbg Reader Price PLogin to OEC Server 4.0.0.0
21:25:32.564 Dbg Reader Order Login to OEC Server 4.0.0.0
21:25:32.666 Err Reader Price 74.201.3.43:9201 Error processing message System.Security.Cryptography.CryptographicException: Bad Length. at System.Security.Cryptography.CryptographicException.ThrowCryptographicException(Int32 hr) at System.Security.Cryptography.RSACryptoServiceProvider.EncryptKey(SafeKeyHandle pKeyContext, Byte[] pbKey, Int32 cbKey, Boolean fOAEP, ObjectHandleOnStack ohRetEncryptedKey) at System.Security.Cryptography.RSACryptoServiceProvider.Encrypt(Byte[] rgb, Boolean fOAEP) at OEC.API.Connection.ProcessChallenge2(ProtoClient`2 client, AuthChallenge authChallenge) at OEC.API.Connection.m_stream2_OnNewMessage(ProtoClient`2 client, ClientResponse item) at OEC.CommLib.ProtoClient`2.ReadLoop() : <ClientResponse > <Challenge ServerVersion=OEC Server 4.0.0.0 PublicKeyM=System.Byte[128] PublicKeyE=System.Byte[3] /> </ClientResponse>

What could happen ? Could you please help me ?
Thanks a lot

Alastair Cunningham
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Jun 30, 2011 @ 10:43 AM             Msg. 2 of 4
Hello,

The reason could be a OS limitation for security. As a workaround, could you please try to use shorter name of client application. It is tricky, but can help

Victor Vins
Lead Software Developer
ACunningham
Posts: 3
Joined: Feb 02, 2011


Posted: Jun 30, 2011 @ 01:10 PM             Msg. 3 of 4
Perfect Victor

it works fine now.

Thank you very much !

Perhaps one question. You mentioned a OS limitation. Which OS do you mean ? On a production erver or on my side ?

Alastair Cunningham
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Jun 30, 2011 @ 02:08 PM             Msg. 4 of 4
On your side. We are going to research how to workaround this issue.

Victor Vins
Lead Software Developer