来自提供程序的错误消息:无法打开RSA密钥容器[已解决] [英] Error message from the provider: The RSA key container could not be opened [SOLVED]

查看:104
本文介绍了来自提供程序的错误消息:无法打开RSA密钥容器[已解决]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我有一个Silverlight应用程序,它利用它的web.config文件来获取它的连接字符串。连接字符串已使用在同一台计算机上运行的RSA实用程序进行加密。每次运行Silerlight应用程序时,我都会收到以下异常。奇怪的是,它适用于运行同一台PC的另一个Silverlight应用程序:confused:



有人可以帮助我吗?



Hi all,

I have a Silverlight application, that makes use of it's web.config file to get it's conneciton string. The connection string has be encrypted with RSA utility that runs on the same machine. I receive the following exception each time I run the Silerlight application. Strange thing is that it works with another Silverlight application that runs of the same PC :confused:

Can anyone please help me?

- <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
- <s:Body>
- <s:Fault>
  <faultcode xmlns:a="http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher">a:InternalServiceFault</faultcode>
  <faultstring xml:lang="en-US">Failed to decrypt using provider 'RsaProtectedConfigurationProvider'. Error message from the provider: The RSA key container could not be opened. (C:\inetpub\wwwroot\CustomQuotes\web.config line 18)</faultstring>
- <detail>
- <ExceptionDetail xmlns="http://schemas.datacontract.org/2004/07/System.ServiceModel" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <HelpLink i:nil="true" />
- <InnerException>
  <HelpLink i:nil="true" />
  <InnerException i:nil="true" />
  <Message>The RSA key container could not be opened.</Message>
  <StackTrace>at System.Configuration.RsaProtectedConfigurationProvider.ThrowBetterException(Boolean keyMustExist) at System.Configuration.RsaProtectedConfigurationProvider.GetCryptoServiceProvider(Boolean exportable, Boolean keyMustExist) at System.Configuration.RsaProtectedConfigurationProvider.Decrypt(XmlNode encryptedNode) at System.Configuration.ProtectedConfigurationSection.DecryptSection(String encryptedXml, ProtectedConfigurationProvider provider) at System.Configuration.Internal.DelegatingConfigHost.DecryptSection(String encryptedXml, ProtectedConfigurationProvider protectionProvider, ProtectedConfigurationSection protectedConfigSection) at System.Configuration.RuntimeConfigurationRecord.CallHostDecryptSection(String encryptedXml, ProtectedConfigurationProvider protectionProvider, ProtectedConfigurationSection protectedConfig) at System.Configuration.BaseConfigurationRecord.DecryptConfigSection(ConfigXmlReader reader, ProtectedConfigurationProvider protectionProvider)</StackTrace>
  <Type>System.Configuration.ConfigurationErrorsException</Type>
  </InnerException>
  <Message>Failed to decrypt using provider 'RsaProtectedConfigurationProvider'. Error message from the provider: The RSA key container could not be opened. (C:\inetpub\wwwroot\CustomQuotes\web.config line 18)</Message>
  <StackTrace>at System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult) at System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject) at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject) at System.Configuration.BaseConfigurationRecord.GetSection(String configKey) at System.Web.HttpContext.GetSection(String sectionName) at System.Web.Configuration.HttpConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String configKey) at System.Configuration.ConfigurationManager.GetSection(String sectionName) at System.Configuration.ConfigurationManager.get_ConnectionStrings() at CustomQuoteDashboard.Web.DataClassesDataContext..ctor() in C:\Development\Applications\Dashboards\CustomQuoteDashboard\CustomQuoteDashboard.Web\DataClasses.designer.cs:line 78 at CustomQuoteDashboard.Web.DataService.Authentication() in C:\Development\Applications\Dashboards\CustomQuoteDashboard\CustomQuoteDashboard.Web\DataService.svc.cs:line 26 at SyncInvokeAuthentication(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)</StackTrace>
  <Type>System.Configuration.ConfigurationErrorsException</Type>
  </ExceptionDetail>
  </detail>
  </s:Fault>
  </s:Body>
  </s:Envelope>





非常感谢提前。

亲切的问候,



Many thanks in advance.
Kind regards,

推荐答案

我曾经得到过Web.config加密时也是同样的错误(对于asp.net应用程序也是如此)。我曾经运行以下命令来解决它。不确定它是否会对您有所帮助,但请试一试。



I used to get the same error when Web.config was encrypted (for asp.net applications also). I used to run the following commands to resolve it. Not sure whether it will help you, but please give a try.

aspnet_regiis -pc "NetFrameworkConfigurationKey" -exp
aspnet_regiis -pa "NetFrameworkConfigurationKey" "ASPNET"
aspnet_regiis -pa "NetFrameworkConfigurationKey" "NETWORK SERVICE"
aspnet_regiis -pa "NetFrameworkConfigurationKey" "NT AUTHORITY\NETWORK SERVICE"


我通过使用以下步骤解决了问题:



1.首先,我在Windows Server 2008上工作

2.打开IIS

3.导航到Web导致问题的网站

4.在网站主页部分的安全性下,单击5.身份验证图标

6.禁用ASP.NET模拟< br $>


亲切的问候,
I fixed the problem by using the following steps:

1. First of all, I was working on Windows Server 2008
2. Open IIS
3. Navigate to the web site that is causing the problem
4. Under Security within the Home section of the web site, click on the 5. Authentication icon
6. Disable ASP.NET impersonation

Kind regards,


大家好,



我是当我运行命令时收到错误未找到RSA密钥容器

aspnet_regiis -pa容器名称NT AUTHORITY\IUSR作为管理员。



请帮助,非常紧急和高度赞赏。
Hi All,

I am getting error "RSA Key container was not found" when I run the command
"aspnet_regiis -pa "Container Name" "NT AUTHORITY\IUSR" as a administrator.

Please help , Its very urgent and highly appreciated.


这篇关于来自提供程序的错误消息:无法打开RSA密钥容器[已解决]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆