I want save my email credentials to the web.config but not statically. It should be configurable. I want it because in development environment and production environment I have different credentials.
I want to send email using this credentials. Is there any way to change web.config settings from umbraco?
I don't think it's wise to be editing a web.config from your CMS as this could be a big security flaw, it depends on what you have in your config but I even encrypt mine because of sensitive info like users and passwords, what you need is XML transforms, this enables you to have a config for each environment and settings in there will override you main web.config depending on what environment you're in.
However technically this is still static, you just have multiple static configs that override eachother, you cant pull data from you DB and put it into the same config file that is configuring your DB connection. I think this is your best solution.
Change web.confib settings environment wise
Hello,
I want save my email credentials to the web.config but not statically. It should be configurable. I want it because in development environment and production environment I have different credentials.
I want to send email using this credentials. Is there any way to change web.config settings from umbraco?
Please help me for it.
Thanks.
Hi Dipa,
Great package for your issue is T4Utilities
Read article https://damieng.com/blog/2009/11/06/multiple-outputs-from-t4-made-easy-revisited
Thanks, Alex
Hi Dipa,
I don't think it's wise to be editing a web.config from your CMS as this could be a big security flaw, it depends on what you have in your config but I even encrypt mine because of sensitive info like users and passwords, what you need is XML transforms, this enables you to have a config for each environment and settings in there will override you main web.config depending on what environment you're in.
https://msdn.microsoft.com/library/dd465318(v=vs.100).aspx
if you're using UaaS refer to this :-
https://our.umbraco.org/documentation/Umbraco-as-a-Service/Set-Up/Config-Transforms/
However technically this is still static, you just have multiple static configs that override eachother, you cant pull data from you DB and put it into the same config file that is configuring your DB connection. I think this is your best solution.
Regards M
is working on a reply...