Encrypted Connection String

  • Thread starter Thread starter Scott M.
  • Start date Start date
S

Scott M.

How would I go about taking my DB connection strings and putting them into
my Web.Config file in encrypted form? Of course, I'd need to know how to
call and decrypt them from the various .aspx pages that need the info.

Thanks!
 
Your link does not directly address my question. Let me clarify.

I'm using VB.NET (so no C# please) and I just would like to see some sample
code that takes a string and encrypts it. Then I'd like to get some info.
on how to store user defined data in web.config and pull it out later (your
link does not go into this).
 
Thanks Bill!


William Ryan said:
I'm attaching a some code (it's just richtext) that will show you how to
define a section in a config file and pull the data out.) You can encrypt it
one of a zillion ways using anything in system CryptoGraphy. I've attached
a VB code class as well. You can just define a cypher for it or use the one
provided "=!@4Fguip:}109NmkDW;>%}zxB>?4Rtd" However, Check out this link,
it's a much much better way of handling things...
http://www.aspnetpro.com/NewsletterArticle/2003/06/asp200306de_l/asp200306de_l.asp


Here's another link on encrypting data (there can be quite a bit to it...
http://www.aspsimply.com/ASPNet/CryptoASPX.aspx depending on how secure you
want your stuff).

So the only hard part if there is one that remains is the Configuration file
and my article that I included addresses that in depth.

HTH,

Bill


http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetHT07.asp
 
Just one thing Bill, my OE is blocking me from getting the attachments. Any
chance you could zip them up and repost?

Thanks!
 
Back
Top