Click here to Skip to main content
15,898,134 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can I use the encrypted connection string to get the data from the sql server ? Do I need to decrypt the connection string before using it or is there any other way ?
Posted

You don't need to decrypt it in order to read/use. If you want to change then you have to decrypt it.

ASP.NET 2.0 introduced Protected Configuration model that allows to encrypt data using two Protected Configuration Providers. They are:
1. RSAProtectedConfigurationProvider: This is the default provider and uses the RSA Public Key Encryption algorithm to encrypt and decrypt data.
2. DataProtectionConfigurationProvider: This provider uses Windows Data Protection Application Programming Interface (DPAPI) to encrypt and decrypt data

MSDN Reads on them:
1. DPAPI[^]
2. RSA[^]

Explaination with Sample here: Edit and Encrypt Web.Config sections using C# 2.0[^]
 
Share this answer
 
v3
Also just have a look to one of my Article's section "Encrypting Configuration Sections".
Configuration Overview: ASP.NET
It'll give you a good idea.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900