Reputation: 195
i want to ask about to encrypt mailSettings section under system.net
but, when i try to encrypt by cmd.exe it seems that they cannot find mailSettings
i use this script
"aspnet_regiis.exe -pef "mailSettings" "D:\website" -prov ConnectionTestProvider"
can someone help me to encrypt this part?
Upvotes: 3
Views: 2394
Reputation: 351
CMD -> run as administrator
cd C:\Windows\Microsoft.NET\Framework\v4.0.30319
---FOR CONNECTIONSTRINGS---
ASPNET_REGIIS -pef "connectionStrings" "C:\Inetpub\wwwroot\namefoldersite" -> CRIPT
ASPNET_REGIIS -pdf "connectionStrings" "C:\Inetpub\wwwroot\namefoldersite" -> DECRIPT
---FOR MAILSETTING---
ASPNET_REGIIS -pef "system.net/mailSettings/smtp" "C:\Inetpub\wwwroot\namefoldersite" -> CRIPT
ASPNET_REGIIS -pdf "system.net/mailSettings/smtp" "C:\Inetpub\wwwroot\namefoldersite" -> DECRIPT
Upvotes: 4
Reputation: 195
I've found the solution. you need to specify path for mailSettings for this one
"aspnet_regiis.exe -pef "system.net/mailSettings/smtp" "D:\website" -prov ConnectionTestProvider"
after try and find solution for days.
Upvotes: 13