File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 55using System . Windows . Forms ;
66
77using AppUpdater ;
8+ using System . Net ;
89
910namespace MedocUpdates
1011{
@@ -30,6 +31,21 @@ static void Main()
3031 return ;
3132 }
3233
34+ // Fix for Telegram.Bot not being able to do something on Windows Server 2008 R2
35+ try
36+ {
37+ ServicePointManager . Expect100Continue = true ;
38+ ServicePointManager . SecurityProtocol = SecurityProtocolType . Tls |
39+ SecurityProtocolType . Tls11 |
40+ SecurityProtocolType . Tls12 |
41+ SecurityProtocolType . Ssl3 ;
42+ }
43+ catch ( Exception ex )
44+ {
45+ MessageBox . Show ( "MedocUpdates: Cannot set the security protocol type - TLS/TLS1.1/TLS1.2/SSL3 probably not supported\r \n " + ex . Message ) ;
46+ return ;
47+ }
48+
3349 ParsedArgs . SetArgs ( Environment . GetCommandLineArgs ( ) ) ;
3450 ParsedArgs . PrintArgs ( ) ;
3551
You can’t perform that action at this time.
0 commit comments