0
votes

I've been encrypting and decrypting my webconfig by following this:

http://msdn.microsoft.com/library/53tyfkaw(v=vs.100).asp

And everything works just fine, I encrypted the appSettings section of my web.config.

I use this command to encrypt the whole "appSettings" section:

aspnet_regiis -pef "appSettings" "path" -prov "RsaProtectedConfigurationProvider"

appSettings>

add key="remote" value="false" />

add key="TimeZone" value="5" />

add key="ErrorLevel" value="Low" />

add key="password" value="XXXXX" />

/appSettings>

But now I need to encrypt not the whole section but just an element. Lets say I only need to encrypt this element:

add key="password" value="XXXXX" />

Any ideas about what is the command to encrypt just en element of a section ?

Regards.

2

2 Answers

0
votes

As far as I know, there isn't one. You have to encrypt the value and store it in the config file manually. I don't believe there is an ability for singularity like you describe.

0
votes

Turns out I just had to create another section and write there the element, and then encrypt that section. Simple as that