After install of the newest Umbraco CMS, the connection string to our SQL Server is of course visible in our web.config.
We know that this file is not reachable for the clients, but someone who has access to the server could see it. And our companies policy is not to use passwords etc. in those config files.
Is there a possibility to add the connectionstring dynamically somewhere in our code?
I already searched in the forum for this, but I found no satisfied/old answers.
Thank you for your answer. We already tested this with Encryption and it indeed works. But we wondered if it is possible to change dynamically the umbracoDbDSN connectionstring in code, so we could add a custom encryption.
Change ConnectionString dynamically in code
Hi,
After install of the newest Umbraco CMS, the connection string to our SQL Server is of course visible in our web.config.
We know that this file is not reachable for the clients, but someone who has access to the server could see it. And our companies policy is not to use passwords etc. in those config files.
Is there a possibility to add the connectionstring dynamically somewhere in our code?
I already searched in the forum for this, but I found no satisfied/old answers.
Regards, Frank
Hi Frank!
Have a look at encrypting the connection string: https://msdn.microsoft.com/en-us/library/dx0f3cf2(v=vs.85).aspx
http://www.codeproject.com/Tips/795135/Encrypt-ConnectionString-in-Web-Config
Hope this can be helpful.
Hi Dennis,
Thank you for your answer. We already tested this with Encryption and it indeed works. But we wondered if it is possible to change dynamically the umbracoDbDSN connectionstring in code, so we could add a custom encryption.
Regards, Frank
I understand, just though I chip in in-case you had'nt thought about encryption. Not sure how to add it dynamically unfortunately. :(
Best of luck to you!
is working on a reply...