How Can I Encrypt Sensitive Credentials in Configuration Files?

Portal software stores sensitive credentials in web application configuration file, namely Web.Config. This section of the configuration file can be encrypted using the well-known DPAPI of Microsoft Windows.

In order to encrypt the web.config via DPAPI, fire up a cmd.exe with Administrative privileges, and then run the below commands;

#cd C:\Windows\Microsoft.NET\Framework\v4.0.30319

#ASPNET_REGIIS -pef "connectionStrings" "C:\inetpub\wwwroot\uvm"

#ASPNET_REGIIS -pef "appSettings" "C:\inetpub\wwwroot\uvm"

Here's an example screenshot;

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Please sign in to leave a comment.
Powered by Zendesk