System.InvalidOperationException: This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.
捕捉到 System.InvalidOperationException
IsTransient=false
Message=此實現不是 Windows 平台 FIPS 驗證的加密算法的一部分。
Source=mscorlib
StackTrace:
在 System.Security.Cryptography.MD5CryptoServiceProvider..ctor()
雖然不明白原因,經過查找一番,網上有人給出解決辦法是:
修改注冊表:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\FipsAlgorithmPolicy 的 enable=0
我是在本地IIS調試網站時遇到的,修改注冊表后並不是立即生效,需要回收網站的應用程序池,然后才生效。
查找資料:
http://blogs.msdn.com/b/shawnfa/archive/2005/05/16/417975.aspx
http://blogs.msdn.com/b/brijs/archive/2010/08/10/issue-getting-this-implementation-is-not-part-of-the-windows-platform-fips-validated-cryptographic-algorithms-exception-while-building-outlook-vsto-add-in-in-vs-2010.aspx