【问题标题】:TLS 1.2, .NET Framework 4.0, and IIS 7.0 on Windows 2008 R2Windows 2008 R2 上的 TLS 1.2、.NET Framework 4.0 和 IIS 7.0
【发布时间】:2017-05-26 19:35:40
【问题描述】:

我有一个运行 SQL Server 2008 的 Windows 2008 R2 服务器和一个 .NET Framework 4.0 Web 应用程序 (CMS)。不幸的是,由于该应用程序,我无法升级 .Net,但我需要禁用 TLS 1.0 及更低版本。当我这样做时,除非我重新启用 1.0.0,否则我将无法访问该应用程序。有没有办法将 TLS 1.2 与 .Net framework 4.0 一起使用?

【问题讨论】:

    标签: .net windows sql-server-2008 iis-7 tls1.2


    【解决方案1】:

    禁用 TLS 1.0 及更低版本是什么意思?

    您可以做的是在 Global.asax 文件中启用/设置为默认 TLS 1.2,它应该可以完成这项工作。

    ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
    

    只需确保 System.Net 已导入

    编辑:

    如果缺少枚举值,您可以尝试下一步

    ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;//SecurityProtocolType.Tls1.2;
    

    这里的坏消息是您可能需要根据this post将 System.dll 替换为 4.5 版本

    【讨论】:

      猜你喜欢
      • 2018-10-21
      • 1970-01-01
      • 2016-10-07
      • 2020-05-27
      • 1970-01-01
      • 2017-05-19
      • 2018-04-07
      • 2011-07-04
      • 1970-01-01
      相关资源
      最近更新 更多