Legacy Dev Forum Posts

 View Only

Sign Up

.NET SDK Websocket-sharp implementation broke with TSL1.0 deprecation

  • 1.  .NET SDK Websocket-sharp implementation broke with TSL1.0 deprecation

    Posted 06-05-2025 18:05

    l.vicenzotti | 2018-07-03 08:57:33 UTC | #1

    Hello,

    due to the TLS 1.0 deprecation, we are unable to connect to the notification service with websocket-sharp. Even downloading the latest nuget package and targeting the latest .NET framework we kept receiving transport error exception in the constructor of the NotificationHandler.

    The only way that we found to solve the issue has been to download the source code from github of the Purecloud .NET SDK and add this line in the NotificationHandler constructor: Websocket.SslConfiguration.EnabledSslProtocols = System.Security.Authentication.SslProtocols.Tls12;

    It appears that websocket-sharp uses TLS1.0 as default option for connection and the websocket channel must be manually set to the updated procotol. Unfortunately this option is not exposed by the PureCloud SDK before connection, therefore our only option at this stage was to recompile the SDK (which we were already doing in order to add proxy support, but I'll open a new thread about this...)


    Shaheem | 2018-07-03 10:31:59 UTC | #2

    Hi Luca,

    Thank you very much for your post. We just started getting the web socket connection issues with our customers in the EU region and your forum post might help us rectify this issue quicker

    Fortunately we are using the Rest API and Web Socket Sharp rather than the Pure Cloud SDK. I'm currently on my way home but I will try your suggestion to see if that fixes our issue and update here.

    Thanks Shaheem


    l.vicenzotti | 2018-07-03 12:02:55 UTC | #3

    Hi Shaheem,

    FYI, our customers are in the EMEA region as well, and we started experiencing issues since this morning. If you are using websocket sharp outside of PureCloud SDK, you should be able to fix the issue by adding the same bit of code that we have added. You can also find an example in this github issue.


    Shaheem | 2018-07-03 13:27:04 UTC | #4

    Hi Luca,

    Thanks that saved us huge amount of time. The below line definitely worked for us and saved us the time to wait for a fix

    [quote] Websocket.SslConfiguration.EnabledSslProtocols = System.Security.Authentication.SslProtocols.Tls12; [/quote]

    Its a shame that this slipped through Genesys testing for the Pure Cloud SDK. They need to update the SDK and add the dependency of the right nuget into the announcement for vendors using the nuget package.

    Thanks Shaheem


    tim.smith | 2018-07-03 14:42:37 UTC | #5

    I apologize for this oversight. The API requests were made to use TLS 1.2 last year; I didn't realize the websockets required a separate setting. I've included the fix for this as of v37.1.3. Thanks for bringing this up here!


    system | 2018-08-03 13:37:02 UTC | #6

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 3111