Tuesday, September 17, 2013

How to create app.config file with some default server info programmatically in c# windows application?

Hi All,


I need to know how to create app.config file with some default server info programmatically in c# windows application.


I'm not using any connection strings. The configuration manager should be able to identify this file as the app.config for the project and read the key values for the server entries. Please help.


I need to create a config file with the below entries:



<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>

<add key="wsServerName0" value="some ipaddress"/>
<add key="wsServerName1" value="some ipaddress"/>

</appSettings>
</configuration>



Vidya Suryanarayana


No comments:

Post a Comment