This is what aspnet_setreg was created for.
See this article:
http://msdn.microsoft.com/library/de...itysection.asp
The idea is to store your credentials in a registry setting, in an encrypted
format. Even if someone gets your app, they don't get the registry. You
can set ACLs on the registry keys to prevent anyone outside the network from
getting the encrypted credentials. There is a utility already in existence
to allow system admins to encrypt the credentials and store them into the
correct spots, and your config files can pull the credentials without many
code changes on your part.
HTH
--- Nick
"Picho" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi all,
>
> Lets say I have a "secret" I wish to "hide", lets say a database password.
> For the more detailed problem, a web application/service that uses a
> connection string.
>
> all the solutions I came up with (embedding in code,
encrypting-decrypting)
> involve embedding the/another secret in the code. since my problem cannot
> request a user intervention, I am at a stop.
>
> what will be the best way to avoid writing secrets in code or hiding them
> anywhere else (registry, external files) while avoiding user intervention
to
> retrieve the secret?
>
> Thanx,
>
> Picho
>
> P.S. - I am taking into consideration the axume that says that anything
> embedded (hard coded) in the code can be extracted by means of debugging
or
> reflecting etc.
>
>