mercredi 1 avril 2015

ServicePointManager.SecurityProtocol works when set in dll but not in exe

We had a problem recently on our hand where client only had TLS 1.2 working, but our apps where built with .NET framework 4.0.


So as worrkaround we told the client to instal .NET 4.5 and applied patch that included this : http://ift.tt/19ITnL4


Suprisingly when above code was put into Program.Main nothing happened, it still didn't work, but when we moved the code to .dll that contains calls to our legacy asmx web service (added as web reference), it worked as expected?


I'm really confused by this because as far as I know System.Net.ServicePointManager is per AppDomain?


Aucun commentaire:

Enregistrer un commentaire