Reputation: 295
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"/>
Upvotes: 0
Views: 709
Reputation: 33326
You can use aspnet_regiis
to do this.
As an example:
aspnet_regiis -pe "connectionStrings" -app "/SampleApplication" -prov "RsaProtectedConfigurationProvider"
Encrypting and Decrypting Configuration Sections
Upvotes: 1