Results 1 to 3 of 3

Thread: Remove plain-text password from app.config connection string

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2007
    Location
    cobwebbed to PC
    Posts
    311

    Remove plain-text password from app.config connection string

    Hi folks

    Some time ago I set up a DB connection in a vb.net windows forms project in VS 2010. I think I remember some pop--up asking me about storage of the password but I didnt matter at the time so I clicked cancel/no.

    Now I have the password stored in plain-text in the app.config file and now it does matter . I took a quick look on Google but it seemed like their was an avalanche of info on hashing, salting, etc (like making breakfast). I just want to get back to that wizard that wanted to do the standard approach for me.

    Have I mis-remembered, is there no such wizard/option? If there is where do I find it in VS?

    Thanks
    Thanks

  2. #2
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Posts
    12,398

    Re: Remove plain-text password from app.config connection string

    What you're referring to is the data source wizard. Try this approach:

    Step 1a. Press Alt + Shift + D to bring up the Data Sources window
    Step 1b. Or in the menu strip, click on data -> Show Data Sources
    Step 2. Click on Add New Data Source...
    Step 3. Follow the wizard on adding a new Database
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | HtmlLessons | CssLessons | Code Tags | Sword of Fury - Jameram

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: Remove plain-text password from app.config connection string

    You can encrypt part of the config file to keep such sensitive data safe. Follow the CodeBank link in my signature and check out my thread on Protected Configuration for more info.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width