+ Post New Thread
Results 1 to 5 of 5
Coding Thread, C# Storing a password safely in Coding and Web Development; I've got an application which sends emails out via an external SMTP server. It currently uses the poor practice of ...
  1. #1

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    17,680
    Thank Post
    516
    Thanked 2,451 Times in 1,897 Posts
    Blog Entries
    24
    Rep Power
    832

    C# Storing a password safely

    I've got an application which sends emails out via an external SMTP server. It currently uses the poor practice of having the server address, username and password details stored within the code itself. A nightmare for maintenance.

    So, I want to know if there's some easy way to store this config for use. I don't want the password stored in plaintext is the problem.

    I'd also prefer not to have to have the user enter their password each time the program opens either.

    Suggestions?

  2. #2

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,859
    Thank Post
    412
    Thanked 777 Times in 650 Posts
    Rep Power
    182
    Investigate the System.Security.Cryptography and System.IO namespaces.

  3. #3

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    17,680
    Thank Post
    516
    Thanked 2,451 Times in 1,897 Posts
    Blog Entries
    24
    Rep Power
    832
    I've now discovered this Using Credential Management in Windows XP and Windows Server 2003

    Which looks like it does what I will want it to do.

  4. Thanks to localzuk from:

    LosOjos (6th January 2010)

  5. #4

    LosOjos's Avatar
    Join Date
    Dec 2009
    Location
    West Midlands
    Posts
    5,452
    Thank Post
    1,439
    Thanked 1,170 Times in 798 Posts
    Rep Power
    707
    Thanks for bringing this to my attention localzuk, it'll come in very handy for a couple of SIMS/Access projects I'm working on

  6. #5

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    17,680
    Thank Post
    516
    Thanked 2,451 Times in 1,897 Posts
    Blog Entries
    24
    Rep Power
    832
    I found a slight issue with it in the end. The SecureString object type has very limited uses at the moment. Until the next version of the .Net framework comes out anyway.

SHARE:
+ Post New Thread

Similar Threads

  1. Storing AD User Credentials In SSO Database
    By azadsani in forum Virtual Learning Platforms
    Replies: 6
    Last Post: 10th August 2009, 03:15 PM
  2. Client images; creating, storing & deploying
    By klop in forum Windows Server 2008
    Replies: 0
    Last Post: 12th May 2009, 11:40 AM
  3. School's responsibilities for storing data
    By cheredenine in forum School ICT Policies
    Replies: 2
    Last Post: 10th June 2008, 12:53 PM
  4. Safely Remove Removable Device
    By phillipmillward in forum Windows
    Replies: 16
    Last Post: 21st March 2007, 04:49 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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