问题描述
我正在尝试在Windows 2008 R2服务器上启用TLS 1.2,以符合PCI规定,并通过以下,需要打开FIPS验证。最后,经过几周寻找解决方案,点击一次,.NET远程处理和MS Web部署通过TLS 1.2进行通信。
但是,我也有Web应用程序当我启用FIPS验证时出现以下错误,退出功能的机器:
我正在使用所有3个应用程序的ASP.NET状态服务,他们正在获得这个堆栈跟踪。
我已经搜索了解决方案,他们基本上都说将算法切换到符合FIPS标准的算法。
但是由于ASP.NET本身正在抛出什么解?我正在使用.NET 3.5,会升级到更新的框架解决问题吗?或者有一个更简单的修复,如配置设置?
以下变更适用于我的情况...
- 在Windows注册表中启用TLS协议。见
-
在应用程序代码中,应用程序启动时添加以下代码行(例如,
Application_Start
为System.Web.Http.Application
)
System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls11 | $。
$ / $ $I am attempting to enable TLS 1.2 on our Windows 2008 R2 server for PCI compliance, and have managed to get it working by following this obscure blog post which requires turning on FIPS validation. Finally, after weeks of looking for a solution, click-once, .NET remoting, and MS Web Deploy are communicating over TLS 1.2.
However, I also have web applications on the machine that quit functioning when I enabled FIPS validation with the following error:
I am using the ASP.NET state service with all 3 of the applications and they are getting this stack trace.
I have searched around for solutions and they all basically say to switch the algorithm to one that is FIPS compliant.
But since this is being thrown by ASP.NET itself what is the solution? I am using .NET 3.5, would upgrading to a newer framework solve the issue? Or is there a simpler fix, such as a configuration setting?
解决方案
The following changes worked in my situation...
Enable TLS protocols in Windows registry. See IIS 7.5: How to enable TLS 1.1 and TLS 1.2
In the application code, add the following line of code when the application starts (e.g.,
Application_Start
for aSystem.Web.Http.Application
)System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls11 | System.Net.SecurityProtocolType.Tls12;
这篇关于ASP.NET中的会话状态FIPS验证错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!