Jump to content
Sign in to follow this  
Guest andreif

The underlying connection was closed: An unexpected error occurred on a send.

Recommended Posts

Guest andreif

Getting this exception, when trying to subscribe for prices stream:

CityIndex.JsonClient.ApiException: The underlying connection was closed: An unexpected error occurred on a send. REQUEST INFO: ItemState : Pending Url : https://ciapipreprod.cityindextest9.co.uk/tradingapi/sessionMethod : POST Target : session UriTemplate : / Parameters : UserName: xx189949 Password: ***** Request URI :https://ciapipreprod.cityindextest9.co.uk/tradingapi/session Request Headers : Accept-Encoding: gzip, deflate,gzip, deflate Host: ciapipreprod.cityindextest9.co.uk Content-Length: 45 Expect: 100-continue Connection: Keep-Alive CacheDuration : 00:00:00 RetryCount : 0 ThrottleScope : data Expiration : 0001-01-01 00:00:00Z ResponseText : NULL —–> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. —–> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. —–> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult) at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult) —– End of inner exception stack trace —– at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult) at System.Net.PooledStream.EndWrite(IAsyncResult asyncResult) at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar) —– End of inner exception stack trace —– at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at CityIndex.JsonClient.RequestController.<>c__DisplayClass91.<EnqueueRequest>b__8(IAsyncResult ar, RequestHolderrequestHolder) inc:\dev\workspace\CIAPI.CS\src\JsonClient\RequestController.cs:line290
   --- End of inner exception stack trace ---
   at CityIndex.JsonClient.Client.Request[TDTO](String target,String uriTemplate, String method, Dictionary2 parameters, TimeSpan cacheDuration, String throttleScope) in c:\dev\workspace\CIAPI.CS\src\JsonClient\Client.cs:line 186 at CIAPI.Rpc.Client.LogIn(String userName, String password) in c:\dev\workspace\CIAPI.CS\src\CIAPI\Rpc\ApiClient.cs:line 103 at CityIndexScreensaver.Data.EnsureConnection() in D:\projects\CIAPI\CityIndexScreensaver\CityIndexScreensaver\Data.cs:line 55 at CityIndexScreensaver.Data.SubscribePricesThreadEntry(String topic, Action`1 onUpdate) in D:\projects\CIAPI\CityIndexScreensaver\CityIndexScreensaver\Data.cs:line 73 Exception ResponseText:

Share this post


Link to post
Guest sky.sanders

that looks like it is failing on login via rpc client and the error message is not helpful at all.

2 questions:

  1. are you using silverlight? (if so, add it as a tag)
  2. can you do a simple rpc client login with your credentials?

(reply in comments to this answer)

Share this post


Link to post
Guest andreif

that looks like it is failing on login via rpc client and the error message is not helpful at all.

2 questions:

  1. are you using silverlight? (if so, add it as a tag)
  2. can you do a simple rpc client login with your credentials?

(reply in comments to this answer)

It was both in WPF and Silverlight. But it doesn’t happen today yet.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×