Problem: After a Windows update the Tridion-CoreService module does not work anymore over SSL.
A Windows Server update (I think released in October 2018) forces us to use TLS 1.2 on the SDL Web Core Service when using SSL.
When connecting using SSL with the Tridion-CoreService module I get an error message like this:
Exception calling "GetCurrentUser" with "0" argument(s): "An error occurred while making the HTTP request to https://hostname/webservices/CoreService201501.svc/basicHttp. This could be due to the fact that the server certificat
e is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the security b
inding between the client and the server."
At C:\Program Files\WindowsPowerShell\Modules\Tridion-CoreService\2.4.2\Trustees.psm1:14 char:9
+ return $Client.GetCurrentUser();
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : CommunicationException
After some experimentation I found that setting System.Net.ServicePointManager.SecurityProtocol to TLS 1.2 does the trick. Apparently now we need explictly set this.
Problem: After a Windows update the Tridion-CoreService module does not work anymore over SSL.
A Windows Server update (I think released in October 2018) forces us to use TLS 1.2 on the SDL Web Core Service when using SSL.
When connecting using SSL with the Tridion-CoreService module I get an error message like this:
After some experimentation I found that setting
System.Net.ServicePointManager.SecurityProtocol
to TLS 1.2 does the trick. Apparently now we need explictly set this.It works with this sample code.
Proposed Solution: Can we have this line of code in the Tridion-CoreService modules?
Alternatively this line of code works as well, but I am not sure if the server will actually allow to use any other protocol than TLS 1.2