Sitecore - System.Security.Cryptography.CryptographicException

发布于 2024-09-14 21:42:14 字数 4278 浏览 1 评论 0原文

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

系统.Security.Cryptography.CryptographyException

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

该网站将正常运行几分钟,但随后应用程序池就会停止运行 被阻止并具有以下详细信息:

“由于某个原因,应用程序池“######”被自动禁用 为该应用程序池提供服务的进程中出现一系列故障。”

检查应用程序日志显示以下内容:

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

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

进程 ID:5156

异常:System.Security.Cryptography.CryptographyException

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

堆栈跟踪:位于 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()

我发现一个网站上的提示说要确保该网站运行的帐户是我所做的加密操作员组的成员。遗憾的是,该网站仍然失败。

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

编辑

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

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

事件 1530,用户配置文件服务详细信息 - 2 个用户注册表句柄 泄露自 \注册表\用户\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965: 进程3260 (\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) 已打开 钥匙 \注册表\用户\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 检测到您的注册表文件仍在被其他人使用 应用程序或服务。该文件现在将被卸载。这 保存您的注册表文件的应用程序或服务可能无法运行 之后正确地。

详细信息 - 13 个用户注册表句柄被泄露 \注册表\用户\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965: 进程5228 (\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) 已打开 钥匙 \注册表\用户\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965 进程5228 (\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) 已打开 钥匙 \注册表\用户\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965 进程5228 (\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) 已打开 钥匙 \注册表\用户\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965 进程5228 (\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) 已打开 钥匙 \注册表\用户\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965 进程5228 (\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) 已打开 钥匙 \注册表\用户\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965\Software\Microsoft\SystemCertificates\TrustedPeople 进程5228 (\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) 已打开 钥匙 \注册表\用户\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965\Software\Microsoft\SystemCertificates\trust 进程5228 (\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) 已打开 钥匙 \注册表\用户\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965\软件\微软\Windows NT\CurrentVersion 进程 5228 (\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) 已打开 钥匙 \注册表\用户\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965\软件\策略\微软\系统证书 进程5228 (\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) 已打开 钥匙 \注册表\用户\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965\软件\微软\系统证书\根 进程5228 (\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) 已打开 钥匙 \注册表\用户\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965\软件\微软\系统证书\SmartCardRoot 进程5228 (\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) 已打开 钥匙 \注册表\用户\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965\Software\Microsoft\SystemCertificates\My 进程5228 (\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) 已打开 钥匙 \注册表\用户\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

Hi and thank you for your help. We're trying to keep a Sitecore site up and running on a WS 2008 R2 Standard server but keep running into the following exception:

System.Security.Cryptography.CryptographicException

The site is set up to run in its own App Pool with the 2.0 framework
version selected and integrated pipeline mode.

The site will run fine for a few minutes but then the app pool ends up
being stopped with the following details:

"Application pool '######' is being automatically disabled due to a
series of failures in the process(es) serving that application pool."

Checking the Application log show the following:

An unhandled exception occurred and the process was terminated.

Application ID: /LM/W3SVC/4/ROOT

Process ID: 5156

Exception: System.Security.Cryptography.CryptographicException

Message: The system cannot find the path specified.

StackTrace: at
System.Security.Cryptography.CryptographicException.ThrowCryptogaphicException(Int32
hr) at System.Security.Cryptography.SafeKeyHandle._FreeHKey(IntPtr
pKeyCtx) at
System.Security.Cryptography.SafeKeyHandle.ReleaseHandle() at
System.Runtime.InteropServices.SafeHandle.InternalFinalize() at
System.Runtime.InteropServices.SafeHandle.Dispose(Boolean disposing)
at System.Runtime.InteropServices.SafeHandle.Finalize()

A tip on one site I found said to make sure that the account that the site is running under is a member of the Cryptographic Operators group which I did. Sadly the site continued to fail.

Any help would be appreciated. Thank you!

EDIT

After I implemented the first answer below I took another look at the server Application logs and it looks like every time the app pool goes down the following warning happens first:

Windows detected your registry file is still in use by other
applications or services. The file will be unloaded now. The
applications or services that hold your registry file may not function
properly afterwards.

Event 1530, User Profile Service DETAIL - 2 user registry handles
leaked from
\Registry\User\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965:
Process 3260
(\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) has opened
key
\REGISTRY\USER\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965
Process 3260
(\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) has opened
key
\REGISTRY\USER\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965\Software\Policies\Microsoft\SystemCertificates

And another example:

Windows detected your registry file is still in use by other
applications or services. The file will be unloaded now. The
applications or services that hold your registry file may not function
properly afterwards.

DETAIL - 13 user registry handles leaked from
\Registry\User\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965:
Process 5228
(\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) has opened
key
\REGISTRY\USER\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965
Process 5228
(\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) has opened
key
\REGISTRY\USER\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965
Process 5228
(\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) has opened
key
\REGISTRY\USER\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965
Process 5228
(\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) has opened
key
\REGISTRY\USER\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965
Process 5228
(\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) has opened
key
\REGISTRY\USER\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965\Software\Microsoft\SystemCertificates\TrustedPeople
Process 5228
(\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) has opened
key
\REGISTRY\USER\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965\Software\Microsoft\SystemCertificates\trust
Process 5228
(\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) has opened
key
\REGISTRY\USER\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965\Software\Microsoft\Windows
NT\CurrentVersion Process 5228
(\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) has opened
key
\REGISTRY\USER\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965\Software\Policies\Microsoft\SystemCertificates
Process 5228
(\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) has opened
key
\REGISTRY\USER\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965\Software\Microsoft\SystemCertificates\Root
Process 5228
(\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) has opened
key
\REGISTRY\USER\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965\Software\Microsoft\SystemCertificates\SmartCardRoot
Process 5228
(\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) has opened
key
\REGISTRY\USER\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965\Software\Microsoft\SystemCertificates\My
Process 5228
(\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) has opened
key
\REGISTRY\USER\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965\Software\Microsoft\SystemCertificates\CA
Process 5228
(\Device\HarddiskVolume3\Windows\System32\inetsrv\w3wp.exe) has opened
key
\REGISTRY\USER\S-1-5-82-3231641130-1035467585-39029555-2466166849-1382764965\Software\Microsoft\SystemCertificates\Disallowed

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

若水般的淡然安静女子 2024-09-21 21:42:14

这可能会有所帮助:在 Windows 7 的 IIS 上运行 Sitecore 6

它基本上是说将其添加到您的 global.asax 中:

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

This might help: Running Sitecore 6 on Windows 7′S IIS.

It basically says to add this in your global.asax:

public void Application_Start() {
  System.Security.Cryptography.RSACryptoServiceProvider.UseMachineKeyStore = true;
  System.Security.Cryptography.DSACryptoServiceProvider.UseMachineKeyStore = true;
}
假装不在乎 2024-09-21 21:42:14

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

Setting up the application pool to 4.0 framework fixed the issue.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文