Hai
I am use config file for capture some values and the used for further process,i am use custom service and website,service is used for communicate with MS Access database and open API(Printer Machine) and website used for communicate with end user and MS Database (i.e)user enter details into database.I am using website to connect open API using ip address and password,that time i need to change some values in config file .so only API read details form database.
First i change the config values before go to connect API and then connect ,Once connect API with database i will restart service,once restart service the capture values in config file is reset to old value.
why it reset to old values if service is running.I will try like this,before going to change config values ,i will stop service and change values then start service,that time capture the changing values.
why if service is stop and change values then start service then values is changed what i am need.
but if service is running time ,if i change values and restart service ,the changed values not hold in config file,i mean before going to change value what in config file ,the same value is appear.(this is running service).
Below is scenario
If service is Running time.
<add key="SendSettingPort" value="50001" />
i will change 500001 to 500002 and restart service.then what i get
<add key="SendSettingPort" value="50001" />
If service stopped time
<add key="SendSettingPort" value="50001" />
i will stop service change 500001 to 500002 and start service.then what i get
<add key="SendSettingPort" value="50002" />
this is my need.
Note:i will give all permission for config file bcz used by website in server.like read,write...
i will chnage service config values via website.not web config file.
Pls reply asap
Regards
AravindB