Cristina Peciña
Cristina Peciña

Reputation: 11

OpenTok CreateSession "Error with request submission"

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

Upvotes: 1

Views: 1458

Answers (3)

Menace
Menace

Reputation: 1070

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.

Upvotes: 0

Cristina Peciña
Cristina Peciña

Reputation: 11

Resolved:

I put this in global.asax Application_Start.

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12

Upvotes: 0

Manik
Manik

Reputation: 1515

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

Upvotes: 5

Related Questions