views:

19

answers:

1

What's the ideal way to store login and password for LDAP membership providers in the web.config?

Having the login and password stored in the provider under connectionUsername/connectionPassword attributes does not go well with me because, I would want to encrypt the connection string later on.

Don't have much experience with this, and was wondering if anyone had any best practices on this.

+1  A: 

Microsoft has tools built into the Framework for encrypting/decrypting sections of your Configuration files:

Encrypting and Decrypting Configuration Sections

And here's a walkthrough:

Walkthrough: Encrypting Configuration Information Using Protected Configuration

Justin Niessner