Hi all,
Wonder if someone can please help a noob. I have been using the James Butler book 'Programming for Betfair' but I wonder if it's a bit out of date. When I run the program I get the following error but I have no idea what I am missing.
An exception of type 'System.Net.WebException' occurred in System.dll but was not handled in user code
Additional information: The request was aborted: Could not create SSL/TLS secure channel.
If there is a handler for this exception, the program may be safely continued.
The app loads the login window then breaks after I enter my username and password. The 2FA screen is not presented, but I have added this PC as a trusted device and also tried temporarily disabling 2FA (re-enabled now) to see if that was causing the issue.
When Visual Studio breaks, it takes me to the penultimate line of this code:
===
Private Function SendSportsReq(ByVal jsonString As String)
Dim request As WebRequest = WebRequest.Create("https://api.betfair.com/exchange/betting/json-rpc/v1")
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(jsonString)
request.Method = "POST"
request.ContentType = "application/json"
request.ContentLength = byteArray.Length
request.Headers.Add("X-Application: **MY KEY**")
request.Headers.Add("X-Authentication: " & ssoid)
Dim dataStream As Stream = request.GetRequestStream() <===
dataStream.write(byteArray, 0, byteArray.Length)
====
More information can be provided if it will help, but any advice would be greatly appreciated!
Wonder if someone can please help a noob. I have been using the James Butler book 'Programming for Betfair' but I wonder if it's a bit out of date. When I run the program I get the following error but I have no idea what I am missing.
An exception of type 'System.Net.WebException' occurred in System.dll but was not handled in user code
Additional information: The request was aborted: Could not create SSL/TLS secure channel.
If there is a handler for this exception, the program may be safely continued.
The app loads the login window then breaks after I enter my username and password. The 2FA screen is not presented, but I have added this PC as a trusted device and also tried temporarily disabling 2FA (re-enabled now) to see if that was causing the issue.
When Visual Studio breaks, it takes me to the penultimate line of this code:
===
Private Function SendSportsReq(ByVal jsonString As String)
Dim request As WebRequest = WebRequest.Create("https://api.betfair.com/exchange/betting/json-rpc/v1")
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(jsonString)
request.Method = "POST"
request.ContentType = "application/json"
request.ContentLength = byteArray.Length
request.Headers.Add("X-Application: **MY KEY**")
request.Headers.Add("X-Authentication: " & ssoid)
Dim dataStream As Stream = request.GetRequestStream() <===
dataStream.write(byteArray, 0, byteArray.Length)
====
More information can be provided if it will help, but any advice would be greatly appreciated!
Comment