http://www.itworld.co.kr/tags/52416/SSL/113007
SSL/TLS의 이해와 TLS 1.3으로 업그레이드해야 하는 이유
웹 초창기부터, SSL(Secure Sockets Layer) 프로토콜과 그 후예인 TLS(Transport Layer Security)는 암호화와 보안을 제공해 인터넷 상거래를 가능하게 만들었다. SSL, TLS와 같은 프로토콜은 점점 더 정교해져 가�
www.itworld.co.kr
본론으로 넘어가서....
TLS 1.2 를 강제 실행하려면, 사이트의 루트에서 global.asax 파일을 찾아 마우스 오른쪽 단추로 클릭하고 코드 열어서 Application_Start 메소드 안에 아래 코드를 기술하면 됩니다.
namespace YourApplication
{
public class WebApiApplication : System.Web.HttpApplication
{
protected void Application_Start()
{
//**Add these lines**
if (ServicePointManager.SecurityProtocol.HasFlag(SecurityProtocolType.Tls12) == false)
{
ServicePointManager.SecurityProtocol = ServicePointManager.SecurityProtocol | SecurityProtocolType.Tls12;
}
//**Add these lines**
AreaRegistration.RegisterAllAreas();
GlobalConfiguration.Configure(WebApiConfig.Register);
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles);
}
}
}
참고자료
https://codeshare.co.uk/blog/how-to-force-a-net-website-to-use-tls-12/
How to force a .NET website to use TLS 1.2
This post shows you how you can force your .NET website to run using TLS 1.2
codeshare.co.uk
asp.net mvc 의 @ 특수기호 문자값으로 사용하기 (0) | 2020.06.30 |
---|---|
ASP.NET MVC 보안 설정 (커스텀 header 로 조치) (1) | 2020.06.05 |
ASP.NET MVC 및 WEB API 에서 TLS 1.2 강제 실행 방법 (0) | 2020.05.27 |
Java 에서 C# 코드 변환하기 (www.tangiblesoftwaresolutions.com) (0) | 2020.03.09 |
jwt 의 security key 자동 genderator 로 만들기 (0) | 2020.03.05 |
ASP.NET MVC 의 Controller 또는 Web API 비인증자 접근 조치사항 (0) | 2020.03.04 |
본문과 관련 있는 내용으로 댓글을 남겨주시면 감사하겠습니다.