问题
Since 31th July 2018 it doesnt work.
When I tried to create a new session id, the exception return below error:
"Error with request submission".
var Session = OpenTok.CreateSession(mediaMode: MediaMode.ROUTED);
I've tried this link as the web developer site indicates, and everything is ok. https://support.tokbox.com/hc/en-us/articles/360000046059-Desupporting-TLS-1-0
I'm using .net 4.5.2 and opentok api Version=2.4.6431.26897
Any idea?
Thanks a lot
回答1:
TokBox Developer Evangelist here.
We disabled support for TLS 1.0 on August 1st which is what your issue looks like. Please confirm that you're not using TLS 1.0 on your production environment.
You can also force TLS1.2 by adding the following:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12
回答2:
Resolved:
I put this in global.asax Application_Start.
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12
回答3:
Manik is right. CreateSession fails at app start. You must configure your app to use only TLS 1.2. As of 6/6/19 the OpenTok .NET samples are broken unless you make this change.
OpenTok /.NET samples https://github.com/opentok/Opentok-.NET-SDK
add to OpenTokService.cs:
System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12
Example: Create a demo account. make changes to the app.config for your API_KEY and API_SECRET HelloWorld sample project will fail (at startup) with "System.Net.Sockets.SocketException: 'An existing connection was forcibly closed by the remote host'" deep in the CreateSession Call. in CreateSession -> Post -> DoRequest -> SendData ->SetRequestStream and then about 22 more stack levels down.
来源:https://stackoverflow.com/questions/51659216/opentok-createsession-error-with-request-submission