Error Creating Session Using Vonage Video API .NET SDK Error Creating Session Using Vonage Video API .NET SDK

Error Creating Session Using Vonage Video API .NET SDK

Yukari Dumburs

Symptom

When using Vonage Video API .NET SDK, you experience errors related to creating sessions.

OpenTokSDK.Exception.OpenTokWebException: Error with request submission
at OpenTokSDK.Util.HttpClient.DoRequest(String url, Dictionary`2 specificHeaders, Dictionary`2 bodyData)
at OpenTokSDK.Util.HttpClient.Post(String url, Dictionary`2 headers, Dictionary`2 data)
at OpenTokSDK.OpenTok.CreateSession(String location, MediaMode mediaMode, ArchiveMode archiveMode)

Object reference not set to an instance of an object. at OpenTokSDK.Util.HttpClient.DoRequest(String url, Dictionary`2 specificHeaders, Dictionary`2 bodyData) 

Sometimes there can also be NullPointerException while creating session due to any of the above exception.

Applies To

  • Video API
  • .NET SDK
  • TLS 1.0

Resolution

  1. Make sure you are using our latest SDK version.
  2. Try forcing TLS 1.2 using the code SecurityProtocol = SecurityProtocolType.Tls12.
  3. Servers running on .NET 4.0 need to upgrade their .NET version to 4.6 .NET framework or a more recent version.
  4. Send a request to https://preview.opentok.com/tls-check.json from within your application and check the response you get. You should get 1.2.

Cause

This is related to the deprecation of TLS 1.0.

Additional Information

For more information about Desupporting TLS 1.1, see our Support Article.