'VS 2013/Windows 10: Adding/Updating Service Reference getting message Could not create SSL/TLS secure channel

I have a project originally developed in VS2010 .NET 4. I need to upgrade it to use TLS 1.2 so I have copied it to my Windows 10 machine running VS1013. I set the framework to 4.5.2 and recompile with no issues.

When I try to Update the Service Reference, I receive the “Could not create SSL/TLS secure channel” error. I am able to see the wsdl contents in a browser and I have installed the certificate under Trusted Authority.

If I try to add a New Service Reference in this, and a different project, I get the same error message.

I read this question “Could not create SSL/TLS secure channel” when adding service reference on WIndows 10 but that did not solve the problem though I have not restarted my machine as the answer said I didn't need to.

I am stuck trying to figure out where the actual issue lies.

TLS 1.2 is enabled in IE Internet Settings.

Thank you



Solution 1:[1]

If you have to use VS2013, then the trick is to view the WSDL in a browser i.e. visit https://www.somesite.com/api.asmx?wsdl

Then save the WSDL to disk.

In VS2013, Right click on the project and select "Add Service Reference..." In the Address: box, enter the physical path (C:\downloads..) of the downloaded/Modified WSDL. Then press Go.

Or update to a later version of Visual Studio.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Fiach Reid