Asked by:
The request was aborted: Could not create SSL/TLS secure channel..
-
I am getting this exception intermittently when posting to Twitter. It works sometimes. Other times, specifically when our nightly build runs at 2AM PST, we get this error.
I have turned on network tracing. We are getting a "returned code=IllegalMessage" in the logs. Here is the relevant section from the logs. Note, Twitter does NOT require client certificates, so that is not an issue. When this call succeeds, I get "returned code=OK" and I see the Twitter SSL cert in the logs.
System.Net Information: 0 : [3876] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = 5c18473730:760f4e8390, targetName = api.twitter.com, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation)
System.Net Information: 0 : [3876] InitializeSecurityContext(In-Buffers count=2, Out-Buffer length=0, returned code=IllegalMessage).
System.Net.Sockets Verbose: 0 : [3876] Socket#46140748::Dispose()
System.Net Error: 0 : [3876] Exception in HttpWebRequest#3781642:: - The request was aborted: Could not create SSL/TLS secure channel..
System.Net Verbose: 0 : [3876] HttpWebRequest#3781642::EndGetResponse()
System.Net Error: 0 : [3876] Exception in HttpWebRequest#3781642::EndGetResponse - The request was aborted: Could not create SSL/TLS secure channel..
- Edited by triple_vee Tuesday, January 28, 2014 9:07 PM
- Moved by Herro wongMicrosoft contingent staff Friday, February 7, 2014 7:22 AM
Question
All replies
-
Hi triple_vee,
I find a possible solution, please refer to the following link to have a try. http://stackoverflow.com/questions/6232746/c-sharp-httpwebrequest-sec-i-renegotiate-intermittent-errors.
Twitter has posted something about changes on Streaming SSL certificate updates. I think you should read it, maybe you find something you are missing.
https://blog.twitter.com/2013/streaming-ssl-certificate-updates.
Hope useful to you.
Regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey. -
Thanks, but this is not the same issue. Nor are we using Twitter's streaming API.
I do not have an errors of type SEC_I_RENEGOTIATE in my logs. Only the "returned code=IllegalMessage".
Note, this only happens intermittently at 2AM PST. Crazy, I know. :(
- Edited by triple_vee Wednesday, January 29, 2014 7:03 AM
-
Hi triple_vee,
You’d better post your thread on twitter forum. I have less experience on dealing with twitter API. Please refer to the following link.
https://dev.twitter.com/discussions.
Regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey. -
Is it possible to tell me under what conditions, return code=IllegalMessage is returned by InitializeSecurityContext()? Or how to get additional diagnostics?
I doubt Twitter is going to have any insight as to what causes this diagnostic error message on the calling side.
-
If it helps, this is the packet that we receive that causes the IllegalMessage error.
00000000 : 04 00 00 B6 00 00 00 00-00 B0 6C 69 80 B7 84 D9 : ..........li.... 00000010 : 93 3A 7C C0 5B 14 76 BC-CA ED 6A CC FE F3 A2 B6 : .:|.[.v...j..... 00000020 : BF 63 BD A1 AA 83 84 70-FA A5 17 01 A0 63 68 0C : .c.....p.....ch. 00000030 : 30 FB 74 44 53 86 46 78-90 C9 B1 E9 B0 3E 29 69 : 0.tDS.Fx.....>)i 00000040 : C5 99 24 18 E1 A9 3F 76-5E BB F9 72 0A DD D7 77 : ..$...?v^..r...w 00000050 : 13 DA E1 63 A1 6E 8E BE-35 B7 9C 82 0C D2 31 D0 : ...c.n..5.....1. 00000060 : A6 A5 47 7C AE AB 0E 09-8A 77 A1 C8 B8 6B 92 F4 : ..G|.....w...k.. 00000070 : 27 6E 27 49 94 CD 12 AD-C1 04 1E 18 0C 70 7E 3C : 'n'I.........p~< 00000080 : 34 C7 B0 73 19 D6 BE CF-94 A5 68 FB 91 FA F7 3C : 4..s......h....< 00000090 : C5 16 25 48 05 7C 5F A5-C6 E0 29 93 F2 8A 4C 0F : ..%H.|_...)...L. 000000A0 : 27 C9 36 DE D8 D5 F3 AB-1E F9 9B 88 80 17 06 2F : '.6............/ 000000B0 : 58 48 58 79 46 29 47 82-A3 18 : XHXyF)G...
-
I think I'm having the same problem as well, although I haven't done any network tracing to confirm. Exactly every 12 hours I see an exception logged for "The request was aborted: Could not create SSL/TLS secure channel", at 1004 and 2204 GMT. There's a bit of business logic on top but basically I'm making a GET to https://api.twitter.com/1.1/statuses/user_timeline.json every 60 seconds. All preceding and subsequent requests are just fine!
It's absolutely bizarre. I'm tempted to discard the exceptions but it would be great to know why this happens.
-
Awesome! Now I know I'm not crazy! But sorry that it's affecting you, too. :(I think I'm having the same problem as well, although I haven't done any network tracing to confirm. Exactly every 12 hours I see an exception logged for "The request was aborted: Could not create SSL/TLS secure channel", at 1004 and 2204 GMT. There's a bit of business logic on top but basically I'm making a GET to https://api.twitter.com/1.1/statuses/user_timeline.json every 60 seconds. All preceding and subsequent requests are just fine!
It's absolutely bizarre. I'm tempted to discard the exceptions but it would be great to know why this happens.
-
-
-
-
I gathered together some links of people seeing this issue and popped it on the Twitter Community site, but I also found a similar post on there that went unanswered a month ago, so I don't hold out much hope.
https://twittercommunity.com/t/could-not-create-ssl-tls-secure-channel-every-day-at-10am-utc/55846