1

My application runs on windows XP restricted user account. The application needs Domain Name, Admin User ID, Admin Password in order to work out with Impersonation class for executing some piece of code with admin privileges. The Admin will also change the Password every 90 days.

Due to security reasons, i cannot maintain the admin credentials in my app.config file.

What else would be best idea ?

Péter Török
  • 114,404
  • 31
  • 268
  • 329
Anuya
  • 8,082
  • 49
  • 137
  • 222

3 Answers3

0

You can use a file, the windows registry or even a webservice to save/retrieve the encripted pwd in (for example) RSA

The Steps about how to use rsa (and others) are described in this other post: Encrypt and decrypt a string

Community
  • 1
  • 1
Jonathan
  • 11,809
  • 5
  • 57
  • 91
0

Here are a couple of ideas:

  • Prompt the user for the credentials each time the app starts.
  • Encrypt the credentials in the app.config using a strong encryption algorithm such as AES. For the encryption key, prompt the user each time the app starts. Use this key to encrypt / decrypt the credentials.
Mike Chamberlain
  • 39,692
  • 27
  • 110
  • 158
0

Use credman API to store the credentials.

Fakrudeen
  • 5,778
  • 7
  • 44
  • 70