Encryption algorithms are secure: the main problem with using encryption for security is secure key management.
Hiding application executable keys has never been safe, but it is probably true that they are easier to find in a managed executable using a tool such as Reflector than in a traditional unmanaged executable.
Encryption of the configuration file may be useful on the server. For example, if you encrypt web.config using DPAPI using a machine key, only users who can log into the server or have write access to the server disk can decrypt it:
Anyone who has read access to the server disk over the network or access to a backup copy of the application directory will not be able to decrypt it.
source share