According to .net guidance of TLS protocol programming, it suggests to config security via appcontext switch when your project targets on .net 4.6. This way works when add a
AppContext switches usage in web config file:
https://github.com/dotnet/docs/issues/6675