How to handle encryption decription of connection string ?

Discussion in 'ASP' started by gatewaytl, Oct 15, 2008.

  1. gatewaytl

    gatewaytl New Member

    Joined:
    Oct 15, 2008
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    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()
     
  2. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,645
    Likes Received:
    87
    Trophy Points:
    48
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    http://blog.pradeep.net.in
    Get the encrypted string into some variable and then decrypt that, so that you don't have to modify the web.config
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice