How to edit and save connection string in web.config file during installation in C #?
2 answers
The easy way might just be to read in the web.config file and replace the line and then output the web.config again:
e.g .: in web.config containing:
...
<add name="Application" connectionString="SETUP_CONNECTION_STRING" />
...
replace SETUP_CONNECTION_STRING
with the actual line:
This assumes its initial setup, where multiple parameters can be set without the need for configuration classes, etc.
+1
source to share
Can you help, take a look here Is it possible to change the configuration of ConnectionStrings at runtime?
NTN
0
source to share