LoginSignup
1
0

More than 3 years have passed since last update.

.NET Framework 4.5でTLS1.2対応

Posted at

とあるサービスの保守対応を忘備録としてまとめ。

問題

Azure Cloud Services (クラシック)にデプロイして、サーバ間通信を行っているが、
相手サーバがTLS1.2対応した事で通信が行えなくなった。
こちら側は、.NET Framework 4.5でAPIを実装しており、
デフォルトではTLS1.1,1.2は無効化されている。

対処

対応として、デフォルトでTLS1.1,1.2が有効化されている
.NET Framework 4.6へのバージョンアップが検討されたが、
影響範囲の懸念から次のコードでTLS1.1,1.2を有効化する事になった。

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls
                                     | SecurityProtocolType.Tls11
                                     | SecurityProtocolType.Tls12;
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0