c# - Encrypt the web.config file -
i trying encrypt connectiostring of web.config file.i ran cmd administrator , gave following commnad
c:\windows\microsoft.net\framework\v4.0.30319>aspnet_regiis -pef provantisdataconnection" "c:\inetpub\wwwroot\psoc"
encrypting configuration section...
the configuration section 'provantisdataconnection' not found.
failed!
i have web.config file inside c:\inetpub\wwwroot\psoc
, th <connectionstrings>
section in web.config follows
<connectionstrings> <add name="provantisdataconnection" connectionstring="data source=(description =(address = (protocol = tcp)(host = 10.00.00.0001)(port= 4321))(connect_data =(server = dedicated)(service_name = abc))));user id=abcd ;password=abcdd;pooling=true;min pool size=5;max pool size=60" providername="oracle.dataaccess.client" /> </connectionstrings>
but still throws failed.
when running aspnet_regiis, need indicate name of node want encrypt. cannot select want encrypt attribute value. basically, change
aspnet_regiis -pef provantisdataconnection
to
aspnet_regiis -pef connectionstrings
Comments
Post a Comment