I'm using Visual Studio 2012 to manage a website. Recently, I changed the Target Framework to .NET Framework 4.5 so I could disable TLS 1.0 on the server and still have it communicate with a SQL server. The main functionality, including its connection to the database, now works with TLS 1.0 disabled.
I'm trying to add a Service Reference (Website -> Add Service Reference). When I enter the URL, I get an error message:
There was an error downloading 'https://<domainName>/PublicAPI/Generic_ws.asmx/_vti_bin/ListData.svc/$metadata'.
The underlying connection was closed: An unexpected error occurred on a receive.
The client and server cannot communicate, because they do not possess a common algorithm
Metadata contains a reference that cannot be resolved: 'https://<domainName>/PublicAPI/Generic_ws.asmx'.
An error occurred while receiving the HTTP response to https://<domainName>/PublicAPI/Generic_ws.asmx. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.
The underlying connection was closed: An unexpected error occurred on a receive.
The client and server cannot communicate, because they do not possess a common algorithm
If the service is defined in the current solution, try building the solution and adding the service reference again.
This is very similar to the error I was getting trying to connect to SQL Server after I disabled TLS 1.0. I fixed it by changing the Target Framework to 4.5 (which is the highest Target Framework listed in my VS 2012).
I have verified with the location that I am connecting to that they support TLS 1.0, 1.1, and 1.2.
Is there a setting somewhere else I need to change for Service References to connect with either TLS 1.1 or 1.2?