I would like to add a complete section to the web.config of a particular instance that the code is deployed to. The section is as follows:
< system.net >
< mailSettings >
< smtp deliveryMethod=“Network” >
< network enableSsl=“true” >
< /smtp >
< /mailSettings >
< /system.net >
Is this possible with a .config file in my solution (pointing to a particular instance)?
Thanks in advance
Thanks for getting in touch! To modify or add to a config file, we generally recommend defining the required change into a transform file using the transform syntax. This allows you to define multiple transform files which can be used dynamically across deployments to each environment. You can read more details in our comprehensive documentation page on configuration files.
You can also refer to Microsoft’s documentation for syntax options and examples.
I hope this helps get you going! Let me know how you go and if you have any further questions going forward.
NONCONFIDENTIAL // EXTERNAL
I saw this out and it was helpful for adding a new key to an existing structure, however It didn’t discuss adding an entire section to the web.config.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.