diff --git a/TwilightBoxart.UX/Program.cs b/TwilightBoxart.UX/Program.cs index a1bae94..61002cc 100644 --- a/TwilightBoxart.UX/Program.cs +++ b/TwilightBoxart.UX/Program.cs @@ -1,4 +1,5 @@ using System; +using System.Net; using System.Windows.Forms; namespace TwilightBoxart.UX @@ -11,6 +12,37 @@ static class Program [STAThread] static void Main() { + // Possible windows XP / 7 / older .net framework compatibility fix. + try + { + ServicePointManager.Expect100Continue = true; + ServicePointManager.SecurityProtocol = (SecurityProtocolType)48 // SSl3 + | (SecurityProtocolType)192 // tls + | (SecurityProtocolType)768 // tls11 + | (SecurityProtocolType)3072 // tls12 + | (SecurityProtocolType)12288; // tls13 + } + catch + { + try // Try without tls13 + { + ServicePointManager.SecurityProtocol = (SecurityProtocolType)48 // SSl3 + | (SecurityProtocolType)192 // tls + | (SecurityProtocolType)768 // tls11 + | (SecurityProtocolType)3072; // tls12 + } + catch + { + try // Try without tls12 + { + ServicePointManager.SecurityProtocol = (SecurityProtocolType)48 // SSl3 + | (SecurityProtocolType)192 // tls + | (SecurityProtocolType)768; // tls11 + } + catch { } + } + } + Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new MainForm());