Click here to Skip to main content
15,891,423 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello, i have a connection string in my c# windows forms application.
In this connection i put the username and password of my SQL server iformations.

I nedd to encrypt the password to not be showen to all.

What I have tried:

I tried this in the cmd and i have success message but nothing happens in my app.config:
ASPNET_REGIIS -pef "connectionStrings" \\tunfile10\Utilisateurs\Ayariho\WindowsFormsApplication1\WindowsFormsApplication1
Posted
Updated 27-Jan-21 21:43pm

That's for encrypting your config in a web site. The problem with encrypting your forms application is that anyone can de-compile it and reverse-engineer your encryption (to pre-empt your next question, no you can't stop people decompiling your app). So if you want to encrypt it you'll need to implement your own encryption but remember it will only deter casual users, it won't stop someone dedicated to hacking your encryption. You're probably better off using sql accounts that only have the access the app needs.
 
Share this answer
 
Comments
houssem eddine ayari 28-Jan-21 3:33am    
@F-ES Sitecore thanks
 
Share this answer
 
v2
Comments
houssem eddine ayari 28-Jan-21 7:24am    
@RickZeeland thanks

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