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,