Click here to Skip to main content
15,898,588 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I want to Encrypt/Decrypt connection string in App config file.

Please help.
Thanks,
Sneha
Posted
Comments
Sudhakar Shinde 5-Jun-13 3:37am    
What is the problem? What is that you have tried so far?
sgjoshi85 5-Jun-13 3:46am    
I have tried RSAProtectedConfigurationProvider and DPAPIProtectedConfigurationProvider. It works fine on my developer machine. But when I install it in client's machine, it doesnt work

 
Share this answer
 
Comments
_Amy 5-Jun-13 4:24am    
+5!
Hi Sneha,

I would suggest you to write your own encryption/decryption technique and make it as runnable application.Which can be used in other project also.
Sure it will help you in project as well as it would help you learn a bit.

Encrypt the connection string using your own method and put it in app.config
Read the encrypted connection string from app.config in application and decrypt it before using it.

This would impress you manager as well ;-)

Thanks,
RK
 
Share this answer
 
Comments
sgjoshi85 5-Jun-13 4:25am    
thanku :)
♥…ЯҠ…♥ 5-Jun-13 4:26am    
Cheers!!

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