How can I secure passwords stored inside web.config?

You can encrypt the web.config with aspnet_regiis. This is to stop people with access to your server from reading sensitive information.

By the way, I would put your config settings inside a class, that can then be injected into your controllers – it will make unit testing easier.

Leave a Comment