The request was aborted: Could not create SSL/TLS secure channel

vikas_kite
I have got this exception (The request was aborted: Could not create SSL/TLS secure channel) While sending new order . By calling this api :

PlaceOrder(string Exchange, string TradingSymbol, string TransactionType, int Quantity, decimal? Price = null, string Product = null, string OrderType = null, string Validity = null, int? DisclosedQuantity = null, decimal? TriggerPrice = null, decimal? SquareOffValue = null, decimal? StoplossValue = null, decimal? TrailingStoploss = null, string Variety = "regular", string Tag = "");

Can you please tell me why i got this exception . But in next order everything got working fine .
  • sujith
    Can you run with debug logs enabled and paste the complete stacktrace here?
    Make sure to mention what version of the library you are using and remove all app and client specific tokens.
  • vikas_kite
    This is very random . It is not coming frequently . I have using this API since one year . But i got this issue today for the first time .

    I am writing the stack trace log here .

    The request was aborted: Could not create SSL/TLS secure channel.
    at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
    at System.Net.HttpWebRequest.GetRequestStream()
    at KiteConnect.Kite.Request(String Route, String Method, Object Params, Boolean json)
    at KiteConnect.Kite.Post(String Route, Object Params, Boolean json)
    at KiteConnect.Kite.PlaceOrder(String Exchange, String TradingSymbol, String TransactionType, Int32 Quantity, Nullable`1 Price, String Product, String OrderType, String Validity, Nullable`1 DisclosedQuantity, Nullable`1 TriggerPrice, Nullable`1 SquareOffValue, Nullable`1 StoplossValue, Nullable`1 TrailingStoploss, String Variety, String Tag)
    at ZDH_Order.Controller.SessionHandling.PlaceOrder(OMS_Order obj)
  • tonystark
    Looks like a network issue or firewall block. Do you have everything upto date - KiteConnect library/Windows updates etc?
  • vikas_kite
    vikas_kite edited March 17
    But why is it coming randomly in between of market hour ? It is not coming on placing every order .
    If there if firewall block then it should come for the every order , right ?
    Recently i have formatted my machine after that this issue started to happen.

    I have other set up also running on different server but running smoothly there .
  • tonystark
    If there if firewall block then it should come for the every order , right ?
    Depends on how firewall identifies a connection as malicious or not. If you have a firewall it is better to whitelist your application.
    Recently i have formatted my machine after this it started coming for the same server only
    Could you clarify this? You recently formatted and then this issue started to happen? Or you tried formatting after this issue started to happen and it is still not fixed?
  • vikas_kite
    Could you clarify this? You recently formatted and then this issue started to happen? Yes
  • vikas_kite
    One more thing to add on :
    As i cheeked firewall is off on the machine .
    There is no network monitoring happen on antivirus also . It is also off
  • tonystark
    In that case I'm out of ideas. Since this happened after a OS reset and your systems work fine in another machine this is clearly a device configuration issue. And that is out of scope of this forum.

    You could try a different ISP, different network device (switch to WiFi/LAN/Android USB tethering), different DNS (OpenDNS, Cloudflare, Google DNS), a VPN (Cloudflare WARP), a different version of your OS etc.

    If you are able to pinpoint to particular configuration or if you are able to identify certain patterns (like disconnection happens precisely at certain times, or after certain number of requests, or after certain action like cancelling an order) let us know, we will investigate further.
  • vikas_kite
    Actually we are not placing order frequently . This issue is coming when order is being placed after some ideal time (30 minutes approx ) . Whenever order transaction is inactive for the 20~30 minutes then it comes right after the new is placed .

    Is it helpful ?
  • tonystark
    Are there any other API calls during this 20 min period? Or you only make order place calls?
Sign In or Register to comment.