Last post Dec 02, 2017 01:54 AM by A2H
Dec 02, 2017 01:06 AM|Andrey23|LINK
We have an ASP.NET website running on IIS, I'm wondering if there is a way to encrypt a connection string section in web.config if no applications were created.
To encrypt I was going to use : aspnet_regiis -pe "connectionStrings" -app "/SampleApplication" -prov "RsaProtectedConfigurationProvider"
But in my case I don't have a value to put into -app
Dec 02, 2017 01:54 AM|A2H|LINK
if there is a way to encrypt a connection string section in web.config if no applications were created.
You can use the aspnet_regiis.exe -pef command to encrypt connectionString values with out providing a web application. Command I used
C:\Windows\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis.exe -pef connectionStrings C:\Forums\Encryption
Make sure the folder path is as per your design. Also you need to run the command window in administrator mode.
Refer this link for more details : Encrypting Connectionstring in webconfig