Exception : The requested security protocol is not supported c#

21,624

As per my research and referring the many blog ,I am find the .NET 3.5 or below. TLS 1.2 is not supported (*) and there is no workaround. Upgrade your application to more recent version of the framework.

Refer link : https://blogs.perficient.com/2016/04/28/tsl-1-2-and-net-support/

Share:
21,624
Admin
Author by

Admin

Updated on September 06, 2020

Comments

  • Admin
    Admin over 3 years

    Exception : The requested security protocol is not supported c#.

    My application is using .net framework 3.5 and run on server windows 2012 R2. After i started getting exception "The underlying connection was closed: An unexpected error occurred on a send." I changed my code and defined the protocol security as below-

    ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072 | (SecurityProtocolType)768; | SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls;

    After changing my code at my local environment started working but still have issue at Live server.

    "The requested security protocol is not supported."

    I have already defined the possible security protocol but still the same code is not working for Live.

    Also, due to limitations of the version we are using, we cannot upgrade the Framework at this time.

    Please suggest.