0

I'm working on asp.net project I have to encrypt credential in web.config file

<add name="ConnectionString"
     connectionString="Data Source=sqlexpress;
                       Initial Catalog=Employee;
                       User ID=testUser;
                       Password=testPassword"
     providerName="System.Data.SqlClient"/>
Buddhika Samith
  • 305
  • 2
  • 7
  • 20
  • possible duplicate of [Encrypting Connection String in web.config](http://stackoverflow.com/questions/1706613/encrypting-connection-string-in-web-config) – mason Jul 15 '15 at 13:55

1 Answers1

1

You can use aspnet_regiis to do this.

As an example:

aspnet_regiis -pe "connectionStrings" -app "/SampleApplication" -prov "RsaProtectedConfigurationProvider"

Encrypting and Decrypting Configuration Sections

hutchonoid
  • 32,982
  • 15
  • 99
  • 104