In my applications we.config file I have a connection string stored. I encrypted it using
'---open the web.config file
Dim config As Configuration = _
ConfigurationManager.OpenWebConfiguration( _
Request.ApplicationPath)
'---indicate the section to protect
Dim section As ConfigurationSection = _
config.Sections("connectionStrings")
'---specify the protection provider
section.SectionInformation.ProtectSection(protectionProvider)
'---Apple the protection and update
config.Save()
Now I can decrypt it using the code
Dim config As Configuration = _
ConfigurationManager.OpenWebConfiguration( _
Request.ApplicationPath)
Dim section As ConfigurationSection = _
config.Sections("connectionStrings")
section.SectionInformation.UnProtectSection()
config.Save()
I want to know where is the key stored.
Also If somehow my web.config file is stolen, will it be possible for him/her to decrypt it using thhe code above.