Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. How do I Encrypt Connection String Password in C# Windows Application

How do I Encrypt Connection String Password in C# Windows Application

Scheduled Pinned Locked Moved C#
questionsecuritycsharpdatabasehelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Hadi6384
    wrote on last edited by
    #1

    Hi I have this Sql Authentication connection string which has a username and password. I added this connection string to Application Settings and the corresponding app.config item was added to my project automatically. But now that i want to access the app.config file in my codes,ConfigurationSection,ConfigurationManager and other related classes,properties and methods are not available.I read many articles on this subject but i havent been able to do the encryption so far. The other question is wether the encryption needs to be done once or should it be done every time the application runs? Is it be possible to set this encrypted connection as a SqlConnection's connection string or the assignment must be done prior to encryption? please help! thanks

    K 1 Reply Last reply
    0
    • H Hadi6384

      Hi I have this Sql Authentication connection string which has a username and password. I added this connection string to Application Settings and the corresponding app.config item was added to my project automatically. But now that i want to access the app.config file in my codes,ConfigurationSection,ConfigurationManager and other related classes,properties and methods are not available.I read many articles on this subject but i havent been able to do the encryption so far. The other question is wether the encryption needs to be done once or should it be done every time the application runs? Is it be possible to set this encrypted connection as a SqlConnection's connection string or the assignment must be done prior to encryption? please help! thanks

      K Offline
      K Offline
      karle
      wrote on last edited by
      #2

      try this http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2010907&SiteID=1&pageid=0#2010907

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups