vis781
Well-known member
Reading and writing a 'Config File' [Resolved]
Hi there, anyone out there who can explain something to me please.....?
I would like to store my database connection string in a application config file however there are two problems i've encountered...
Firstly the only config file that i seem to be able to make is a web config file does this matter or is there a way of changing it to an application config file. To do this i'm simply going to add new item 'config file' and it always puts a web config file in by default.
Secondly i've heard that you can't or shouldn't write to a config file at runtime, i dont know why i just read somewhere that it's not a good idea. Is this true? If not is there a specific way to do this. And if it is true anyone got any good ideas on where to store my connection string??
Any help greatly appreciated.
Hi there, anyone out there who can explain something to me please.....?
I would like to store my database connection string in a application config file however there are two problems i've encountered...
Firstly the only config file that i seem to be able to make is a web config file does this matter or is there a way of changing it to an application config file. To do this i'm simply going to add new item 'config file' and it always puts a web config file in by default.
Secondly i've heard that you can't or shouldn't write to a config file at runtime, i dont know why i just read somewhere that it's not a good idea. Is this true? If not is there a specific way to do this. And if it is true anyone got any good ideas on where to store my connection string??
Any help greatly appreciated.
Last edited: