How to encrpyt passwords so they dont show in connectionstring?


J

JB

Hello

I would like to encrypt my passwords in my ConnectionString parameters
so the
passwords dont show.

How can I do this?

Also I saw the line below:

Framework.EncryptDecrypt(ConfigurationManager.Appsettings["Password"])

and it seems to put funny characters in the password "value" field in the
<add key=> parameter in <appSettings> section of the web.config, is that the
actual effect of the line?


JB
 
Ad

Advertisements

M

Mark Stevens

Check out:

http://weblogs.asp.net/scottgu/archive/2006/01/09/434893.aspx

Cheers,
Mark

Hello

I would like to encrypt my passwords in my ConnectionString parameters
so the
passwords dont show.

How can I do this?

Also I saw the line below:

Framework.EncryptDecrypt(ConfigurationManager.Appsettings["Password"])

and it seems to put funny characters in the password "value" field in the
<add key=> parameter in <appSettings> section of the web.config, is that the
actual effect of the line?


JB
--
|\ _,,,---,,_ A picture used to be worth a
ZZZzzz /,`.-'`' -. ;-;;, thousand words - then along
|,4- ) )-,_. ,\ ( `'-' came television!
'---''(_/--' `-'\_)

Mark Stevens (mark at thepcsite fullstop co fullstop uk)

This message is provided "as is".
 
Ad

Advertisements

G

Gregory A. Beamer

Hello

I would like to encrypt my passwords in my ConnectionString
parameters
so the
passwords dont show.

Use the built in functionality in ASP.NET 2.0 where you encrypt the
entire connection string section. It is the preferred methodology and
there are plenty of sites out there that document the feature.

NOTE: If you are using an ISP, or a web farm, create machine keys first
(Google this, as there are machine key generators on the web that are
easy to find). You can then use the keys in the web.config on the server
to ensure you can encrypt when you deploy. If you do not do this, you
have to encrypt on the actual server(s) you deploy to, as the machine
keys are machine specific if not stated in config.

Peace and Grace,
 

Top