none
Outlook VSTO Addin Not working : Changing Default Security Protocol to TLS 1.2 RRS feed

  • Question

  • Hi Guys,

    I have an Outlook VSTO Addin on Outlook 2016. Since TLS 1.0 is Outdated, I have disabled TLS 1.0 Security Protocol in regedit.exe. Then after Outlook Addin stopped working and an error pops out.

    ---------------------------
    The underlying connection was closed: An unexpected error occurred on a receive.
    ---------------------------

    I have checked in debugging that though the target framework of Addin is ".NET v4.6.2". The default security protocol is "sslv3 | TLS". This is causing addin to pop an error while connecting to server.

    I have googled quite a bit, I don't want to hard code security protocol using below code

    ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12

    I have done many things to roll out but failed. This is my final attempt to seek your help guys. what we wanted is Outlook addin must function normally when TLS 1.0 is rolled off. Please Help us through this. Thank you in advance.

    Monday, February 26, 2018 12:51 PM

Answers

All replies

  • Hello Pavan Varikallu,

    For specifying default Security Protocol, please try to refer to below link.

    How to restrict the use of certain cryptographic algorithms and protocols in Schannel.dll

    Best Regards,

    Terry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, February 27, 2018 8:56 AM
  • Hi Terri I tried to do so, (Though that's a bit confusing). There is no difference in the result. Error pops out again :(
    Tuesday, February 27, 2018 10:23 AM
  • From where will outlook take this default security protocol. If it is from s channel then why dint it change when i disabled TLS 1.0 and SSLv3. Are there any settings to change in outlook??
    Tuesday, February 27, 2018 11:10 AM
  • Thanku guys for the help. Anyhow i found the solution somewhere. Below is the link for the solution:

    https://stackoverflow.com/questions/42407126/soaphttpclientprotocol-and-tls-1-2-the-client-and-server-cannot-communicate-b

    If you would like to work from application side below screenshot gives a brief idea to get latest protocols from targer framework and assign to ServicePointManager without hard coding the protocol.

    Outlook VSTO support to tls 1.2 and tls 1.1 with out hard coding

    You need to have IIS Crypto for that.



    Tuesday, February 27, 2018 12:04 PM
  • Hello Pavan Varikallu,

    I'm glad to hear that you have solved the issue. I suggest you mark your solution as answer to close this thread.

    If you have any other issue, please feel free to post threads to let us know.

    Thanks for understanding.

    Best Regards,

    Terry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, February 28, 2018 7:13 AM