Click here to Skip to main content
15,891,136 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: adding Launch conditions Pin
Raj Jayaswal19-Sep-09 3:12
Raj Jayaswal19-Sep-09 3:12 
GeneralRe: adding Launch conditions Pin
Eddy Vluggen19-Sep-09 3:19
professionalEddy Vluggen19-Sep-09 3:19 
GeneralRe: adding Launch conditions Pin
Raj Jayaswal19-Sep-09 3:21
Raj Jayaswal19-Sep-09 3:21 
GeneralFixed length record file library Pin
Brady Kelly18-Sep-09 2:07
Brady Kelly18-Sep-09 2:07 
Generalon secondary topic Pin
Luc Pattyn18-Sep-09 2:21
sitebuilderLuc Pattyn18-Sep-09 2:21 
GeneralRe: on secondary topic Pin
Brady Kelly18-Sep-09 3:12
Brady Kelly18-Sep-09 3:12 
GeneralRe: Fixed length record file library Pin
Henry Minute18-Sep-09 3:31
Henry Minute18-Sep-09 3:31 
QuestionFailed to decrypt Password using RsaProtectedConfigurationProvider Pin
Sourabh N18-Sep-09 1:27
Sourabh N18-Sep-09 1:27 
Hi,

I have a .net solution that contains Windows Service Application. This application has app.config file that stores the connection strings and Appsettings. To encrypt these sensitive information, i am using the protectsection and unprotectsection with 'RsaProtectedConfigurationProvider'. These methods are written in a class "UsingRsaProtectedConfigurationProvider", in the WindowService project.

I have created a console application in the same solution. These console application calls the protectsection() method of class "UsingRsaProtectedConfigurationProvider" while encrypting. These console application is executed first to encrypt the app.config values.

However, when i start the windows service, it gives me an error "Failed to decrypt using provider 'RsaProtectedConfigurationProvider'. Error message from the provider: The RSA key container could not be opened."

I am pasting the inner exeception here. Please help me as i am unable to proceed.

<Snip>

System.Configuration.ConfigurationErrorsException was unhandled by user code

Message="Failed to decrypt using provider 'RsaProtectedConfigurationProvider'. Error message from the provider: The RSA key container could not be opened. (D:\\ContentIngestionTools\\RSSIngestorWS\\bin\\Debug\\NDNrssIngestor.exe.Config line 16)"

Source="System.Configuration"

BareMessage="Failed to decrypt using provider 'RsaProtectedConfigurationProvider'. Error message from the provider: The RSA key container could not be opened."

Filename="D:\\ContentIngestionTools\\RSSIngestorWS\\bin\\Debug\\NDNrssIngestor.exe.Config"

Line=16

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.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, 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, Boolean getLkg, Boolean checkPermission)

at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)

at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName)

at System.Configuration.ConfigurationManager.GetSection(String sectionName)

at System.Configuration.ConfigurationManager.get_AppSettings()

at System.Configuration.ConfigurationSettings.get_AppSettings()

at RSSIngestorWS.RSSService.OnStart(String[] args) in D:\ContentIngestionTools\RSSIngestorWS\RSSService.cs:line 49

at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state)

InnerException: System.Configuration.ConfigurationErrorsException

Message="The RSA key container could not be opened."

Source="System.Configuration"

BareMessage="The RSA key container could not be opened."

Line=0

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.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.DecryptSection(String encryptedXml, ProtectedConfigurationProvider protectionProvider, ProtectedConfigurationSection protectedConfigSection)

at System.Configuration.Internal.DelegatingConfigHost.DecryptSection(String encryptedXml, ProtectedConfigurationProvider protectionProvider, ProtectedConfigurationSection protectedConfigSection)

at System.Configuration.BaseConfigurationRecord.CallHostDecryptSection(String encryptedXml, ProtectedConfigurationProvider protectionProvider, ProtectedConfigurationSection protectedConfig)

at System.Configuration.RuntimeConfigurationRecord.CallHostDecryptSection(String encryptedXml, ProtectedConfigurationProvider protectionProvider, ProtectedConfigurationSection protectedConfig)

at System.Configuration.BaseConfigurationRecord.DecryptConfigSection(ConfigXmlReader reader, ProtectedConfigurationProvider protectionProvider)

InnerException:

</Snip>
QuestionHow to prevent decompilation of vb.net exe or dll? Pin
savitri18-Sep-09 0:25
savitri18-Sep-09 0:25 
AnswerRe: How to prevent decompilation of vb.net exe or dll? Pin
Not Active18-Sep-09 1:51
mentorNot Active18-Sep-09 1:51 
AnswerRe: How to prevent decompilation of vb.net exe or dll? Pin
Arun Jacob18-Sep-09 2:03
Arun Jacob18-Sep-09 2:03 
AnswerRe: How to prevent decompilation of vb.net exe or dll? Pin
bindasrakesh29-Nov-10 21:59
bindasrakesh29-Nov-10 21:59 
QuestionMOSS Pin
Gunjan pandey17-Sep-09 23:09
Gunjan pandey17-Sep-09 23:09 
AnswerRe: MOSS Pin
Richard MacCutchan17-Sep-09 23:55
mveRichard MacCutchan17-Sep-09 23:55 
AnswerRe: MOSS Pin
Not Active18-Sep-09 1:50
mentorNot Active18-Sep-09 1:50 
Questionhow to pass excel application object to automation object? Pin
SRKSHOME17-Sep-09 20:50
SRKSHOME17-Sep-09 20:50 
AnswerRe: how to pass excel application object to automation object? Pin
Richard MacCutchan17-Sep-09 22:54
mveRichard MacCutchan17-Sep-09 22:54 
QuestionHow to deserialize on top of an existing object? Pin
RichardM117-Sep-09 16:49
RichardM117-Sep-09 16:49 
QuestionLinkDemands and FxCop [modified] Pin
Gideon Engelberth17-Sep-09 4:54
Gideon Engelberth17-Sep-09 4:54 
QuestionGetting the current Windows Session user from a different User Domain Pin
Tristan Rhodes16-Sep-09 6:30
Tristan Rhodes16-Sep-09 6:30 
GeneralVS SDK: How to apply additional formatting after (not instead) default colorization. Pin
Sergiy Sakharov16-Sep-09 3:58
Sergiy Sakharov16-Sep-09 3:58 
Questionupzip a folder in vb.net Pin
nicetohaveyou15-Sep-09 21:36
nicetohaveyou15-Sep-09 21:36 
AnswerRe: upzip a folder in vb.net Pin
Eddy Vluggen16-Sep-09 5:16
professionalEddy Vluggen16-Sep-09 5:16 
QuestionWeb Camera settings Pin
Raj Jayaswal15-Sep-09 6:56
Raj Jayaswal15-Sep-09 6:56 
AnswerRe: Web Camera settings Pin
Manas Bhardwaj16-Sep-09 8:45
professionalManas Bhardwaj16-Sep-09 8:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.