Click here to Skip to main content
15,887,175 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My hoster doesn't allow access to their registry so the published ways to encrypt connection strings won't work. Up to now, I just included the connection strings in the code behind, precompiled the web pages, and stored the customer data in a different database from the aspnetdb.mdf. I don't know if this really enhances security. And it would be fine to hide the connection to the membership data as well. Does anybody know a way to do this?
Thanks
Fritz
Posted

The .Net Framework supports encryption of connection strings in the app.config file.  This replaces the need to use the registry.

See this MSDN article[^] for more details. 

 
Share this answer
 
I started trying with DpapiDataProtectionProvider 3 years ago but I tried again today. That works fine locally but it doesn't work on the server of my hosting provider. When I upload the encrypted config file, the host machine doesn't know what to do with the cypher. If I try to encrypt on the host machine, only part of the connectionStrings is encrypted (not the sensible parts), and the system stops recognizing any code in the config file. It seems to be a question of trust level, which is a hot subject for web hosters.
 
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