I am working on a project where I need to generate Telerik reports, and I'm trying to implement a solution where the connection string used in the Telerik report is encrypted and doesn't rely on the connection strings stored in the web.config file. My goal is to enhance security by managing the connection string independently of the web configuration.
I've explored the use of the 'rsaprotectedconfigurationprovider' and the 'DataProtectionConfigurationProvider' for encrypting connection strings in the web.config. However, I'm looking for a way to dynamically set an encrypted connection string directly in the code-behind without relying on the web.config file.
Could someone provide guidance or examples on how to achieve this? Specifically, how can I generate a Telerik report with an encrypted custom connection string set in the code-behind?
Thanks in advance!
Connection strings can be encrypted in the
web.configfile like this:Check out this document for more information: The ultimate guide to connection strings in web.config