Page 1 of 1

Writing to web.config file

Posted: Wed Oct 25, 2006 6:32 am
by adeid
Hi,
Please can you tell me how I can write to web.config file of my web application during installation? I want to add some configuration settings to this file during installation.
Thank you.

Posted: Wed Oct 25, 2006 6:34 am
by MichaelNesmith
You can use the Write to Text File command.

Writing to web.config file

Posted: Wed Oct 25, 2006 7:01 am
by adeid
Please can I get script on how to use "Write to Text File command" to acomplish this?

Posted: Wed Oct 25, 2006 10:44 am
by MichaelNesmith
Please drag-drop or type to insert the Write to Text File command into your setup script, and press F1 while the window is showing to get command help.

Posted: Tue Oct 31, 2006 11:12 am
by adeid
The "Write Text File Command" can not help in this situation because it can only write to the begining or end of a file. But I need to write to the "application settings" section of a web.config file. Any suggestion?

Posted: Tue Oct 31, 2006 1:37 pm
by Gizm0
Multiple Write Text Commands! :)
First call to write the start part of file, then the application block, then the rest of it.

Posted: Tue Oct 31, 2006 7:29 pm
by MichaelNesmith
Also check the EditFile plug-in, available for free on this forum.