Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 03, 2016, 01:44:44 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: How to handle encryption decription of connection string ?  (Read 2095 times)

gatewaytl

  • Participant
  • Joined in 2008
  • *
  • Posts: 1
    • View Profile
    • Donate to Member
How to handle encryption decription of connection string ?
« on: October 16, 2008, 03:59:20 AM »
Hi Friends,

I have created two functions that encrypt and decrypt the connection string in web.config. But whenever I want to use connection string. I have to always decrypt web.config and then again encrypt it back. Does there any other way which i can use.

I'm using section.SectionInformation.ProtectSection(" <encryption configuration provider> ") and section.SectionInformation.UnprotectSection()

CWuestefeld

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,001
    • View Profile
    • Donate to Member
Re: How to handle encryption decription of connection string ?
« Reply #1 on: October 16, 2008, 08:54:24 AM »
You can set things up so that the configuration section provider does the decryption for you. See this article.

Obviously, you (as the developer) need to do the initial work to encrypt the data and put it into the .config in the first place.

And, of course, if you've got a farm then each machine will by default have its own machine key for encrypt/decrypt, which would necessitate separately encrypted .config files for each machine, and that's no good. You'll need to set a different key, as described here.