【问题标题】:Sitecore - System.Security.Cryptography.CryptographicExceptionSitecore - System.Security.Cryptography.CryptographicException
【发布时间】:2011-03-31 02:31:24
【问题描述】:

您好,感谢您的帮助。我们正在尝试在 WS 2008 R2 标准服务器上保持 Sitecore 站点正常运行,但仍然遇到以下异常:

System.Security.Cryptography.CryptographicException

该站点设置为使用 2.0 框架在其自己的应用程序池中运行 版本选择和集成管道模式。

该网站将在几分钟内正常运行,但随后应用程序池结束 被以下细节停止:

“应用程序池 '######' 被自动禁用,原因是 为该应用程序池服务的进程中的一系列故障。”

检查应用程序日志显示如下:

发生未处理的异常,进程终止。

应用程序 ID:/LM/W3SVC/4/ROOT

进程 ID:5156

异常:System.Security.Cryptography.CryptographicException

消息:系统找不到指定的路径。

堆栈跟踪:在 System.Security.Cryptography.CryptographicException.ThrowCryptogaphicException(Int32 hr) 在 System.Security.Cryptography.SafeKeyHandle._FreeHKey(IntPtr pKeyCtx) 在 System.Security.Cryptography.SafeKeyHandle.ReleaseHandle() 在 System.Runtime.InteropServices.SafeHandle.InternalFinalize() 在 System.Runtime.InteropServices.SafeHandle.Dispose(布尔处理) 在 System.Runtime.InteropServices.SafeHandle.Finalize()

我在一个站点上发现的一条提示说,要确保运行该站点的帐户是我所做的 Cryptographic Operators 组的成员。可悲的是,该网站继续失败。

任何帮助将不胜感激。谢谢!

编辑

在我实现下面的第一个答案后,我再次查看了服务器应用程序日志,看起来每次应用程序池关闭时都会首先发生以下警告:

Windows 检测到您的注册表文件仍在被其他用户使用 应用程序或服务。现在将卸载该文件。这 保存您的注册表文件的应用程序或服务可能无法运行 之后适当地。

事件 1530,用户配置文件服务详细信息 - 2 个用户注册表句柄 泄漏自 \注册表\用户\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965: 进程 3260 (\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) 已打开 钥匙 \REGISTRY\USER\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965 进程 3260 (\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) 已打开 钥匙 \REGISTRY\USER\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965\Software\Policies\Microsoft\SystemCertificates

还有一个例子:

Windows 检测到您的注册表文件仍在被其他用户使用 应用程序或服务。现在将卸载该文件。这 保存您的注册表文件的应用程序或服务可能无法运行 之后适当地。

DETAIL - 13 个用户注册表句柄从 \注册表\用户\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965: 进程 5228 (\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) 已打开 钥匙 \REGISTRY\USER\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965 进程 5228 (\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) 已打开 钥匙 \REGISTRY\USER\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965 进程 5228 (\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) 已打开 钥匙 \REGISTRY\USER\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965 进程 5228 (\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) 已打开 钥匙 \REGISTRY\USER\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965 进程 5228 (\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) 已打开 钥匙 \REGISTRY\USER\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965\Software\Microsoft\SystemCertificates\TrustedPeople 进程 5228 (\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) 已打开 钥匙 \REGISTRY\USER\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965\Software\Microsoft\SystemCertificates\trust 进程 5228 (\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) 已打开 钥匙 \REGISTRY\USER\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965\Software\Microsoft\Windows NT\CurrentVersion 进程 5228 (\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) 已打开 钥匙 \REGISTRY\USER\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965\Software\Policies\Microsoft\SystemCertificates 进程 5228 (\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) 已打开 钥匙 \REGISTRY\USER\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965\Software\Microsoft\SystemCertificates\Root 进程 5228 (\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) 已打开 钥匙 \REGISTRY\USER\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965\Software\Microsoft\SystemCertificates\SmartCardRoot 进程 5228 (\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) 已打开 钥匙 \REGISTRY\USER\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965\Software\Microsoft\SystemCertificates\My 进程 5228 (\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) 已打开 钥匙 \REGISTRY\USER\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965\Software\Microsoft\SystemCertificates\CA 进程 5228 (\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) 已打开 钥匙 \REGISTRY\USER\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965\Software\Microsoft\SystemCertificates\Disallowed

【问题讨论】:

    标签: asp.net sitecore sitecore6


    【解决方案1】:

    这可能会有所帮助:Running Sitecore 6 on Windows 7′S IIS

    它基本上说在你的global.asax中添加这个:

    public void Application_Start() {
      System.Security.Cryptography.RSACryptoServiceProvider.UseMachineKeyStore = true;
      System.Security.Cryptography.DSACryptoServiceProvider.UseMachineKeyStore = true;
    }
    

    【讨论】:

    • 这是最终修复它的解决方案。再次感谢您!
    【解决方案2】:

    将应用程序池设置为 4.0 框架解决了该问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-07-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-08-19
      • 1970-01-01
      相关资源
      最近更新 更多