Recently I was creating a module to install basic things for other modules dependent of it. I have to make a web.config change manually in order to all modules work and I was wondering if there is any way to automate it in the module instalation proccess.
Asked
Active
Viewed 351 times
1 Answers
6
Yes. In your module's DNN Manifest file, you can add a config section.
http://www.dnnsoftware.com/wiki/manifest-config-component
Example:
<component type="Config">
<config>
<configFile>web.config</configFile>
<install>
<configuration>
<nodes>
<node path="/configuration/appSettings" action="update" key="key" collision="overwrite">
<add key="myCustomKey" value="123456789" />
</node>
</nodes>
</configuration>
</install>
<uninstall>
<configuration>
<node path="/configuration/appSettings/add[@key='myCustomKey']" action="remove" />
</configuration>
</uninstall>
</config>
</component>

Fix It Scotty
- 2,852
- 11
- 12