Click here to Skip to main content
15,885,767 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello everyone - I've been trying to find a way to encrypt or further secure the web.config file for my website. I have read a lot of guides and my main limitation from these is that I am using web hosting on a shared server (GoDaddy, specifically) so I do not have access to root drive or command line on the server. The main reason I want to be able to secure this is so that I can build a non-billing (doesn't require Meaningful Use) electronic health records application - I need a way to connect to a SQL database and access health information. SSL is a no-brainer, but that protects the transport... I am hoping that since I also have similar restrictions on what I can do to the database, that I can secure my connection strings and include a key to encrypt and decrypt data stored on the server from the application side since server side doesn't appear to be an option.

The problem with just decrypting-on-demand in the backend of any page seems to be the same problem as leaving the connection string in the web.config... while neither are served to a user on the site, anyone with file access to the site directory can open the files and get the connection strings anyways.

One possible solution would appear to just rent a virtual server, which gives the me ability to try the normal routes, but that would be cost-prohibitive.

What I have tried:

So far, the methods I've seen have required changing IIS settings through the command line, decrypting a pre-encrypted connection string in the .cs page back-end, and attempting to use the WebConfigurationManager a la this guide, which works swimmingly on localhost but access is denied once it's deployed to production.
Posted
Comments
Dave Kreskowiak 26-May-18 18:38pm    
Please tell me you're not going to be putting HIPPA regulated data on a PUBLIC WEB SERVER!? You're opening yourself up to liability issues and severe penalties if you do. Think $100 to $50000 times the number of member records exposed times the number of violations.

This is normally something you host yourself with security expertise, not on GoDaddy or any other public service.
dfarr1 26-May-18 19:47pm    
First and foremost, you’ve offered no solution. Clearly the point here is to secure the data, otherwise there would be no point in this. I’m here asking for help on securing a web.config, which is useful whether it’s an EHR or any other web application that has connection strings, for that matter.
Dave Kreskowiak 26-May-18 20:59pm    
As I'm someone who works in the health insurance industry, go ahead and ignore my question at your own peril.
[no name] 27-May-18 13:53pm    
You can supply "credentials" via code; it does not need to go in web.config.

You also cannot assume the ISP / GoDaddy, and a given "hosting plan", is not secure; particularly when it includes a dedicated server.

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