asp.net – Sitecore – System.Security.Cryptography.CryptographicException

前端之家收集整理的这篇文章主要介绍了asp.net – Sitecore – System.Security.Cryptography.CryptographicException前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
嗨,谢谢你的帮助.我们正在尝试在WS 2008 R2 Standard服务器上启动并运行Sitecore站点,但仍然遇到以下异常:

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()

我找到的一个网站上的提示说要确保该网站运行的帐户是我所做的加密运算符组的成员.可悲的是,该网站继续失败.

任何帮助,将不胜感激.谢谢!

编辑

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

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

另一个例子:

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

解决方法

这可能会有所帮助: 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;
}
原文链接:/aspnet/251236.html

猜你在找的asp.Net相关文章