Issue is occurring due to disabling of the TLS 1.0

Ava Tomlinson 111 Reputation points
2021-04-22T13:46:14.487+00:00

I have observed TLS/SSL secure channel issue with provide hosted app while testing the application(XLCubedViewer). The issue is occurring due to disabling of the TLS 1.0.

"error is: at System.Net.HttpWebRequest.GetResponse() at Microsoft.SharePoint.Client.SPWebRequestExecutor.Execute() at Microsoft.SharePoint.Client.ClientRequest.ExecuteQueryToServer(ChunkStringBuilder sb) at Henkel.XLCubedReportsWeb.Controllers.HomeController.GetDefaultImageLinkUrl(String tileID)
The underlying connection was closed: An unexpected error occurred on a send"

Is there any out of the box solution (without any application code change) which can tell application to connect to the default TLS protocol???90364-tls-error1.jpg90319-xlcubed-tls-error.png

Microsoft 365 and Office | SharePoint Server | For business
{count} votes

Accepted answer
  1. Echo Du_MSFT 17,316 Reputation points
    2021-04-23T09:04:11.81+00:00

    Hello @Ava Tomlinson ,

    There is no out of the box solution (without any application code change) that can tell the application to connect to the default TLS protocol.

    Please add this to beginning of your code:

    ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12;  
    

    Here is a case for your reference:

    It is worth noting that disabling TLS 1.0 may cause compatibility issues with sites that don't support newer security protocol versions.

    If you add this code, you still get an error. Then I suggest you still enable TLS 1.0 .

    Thanks,
    Echo Du

    =========================

    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.