473,385 Members | 1,944 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

App.Config

Hi All,

I've wrote a windows service, and I'm trying to find a way to reload the
app.config <add> tags at runtime.

It looks like the dot net framework does not support it in any way.

Please replay if you know how can I do it.

Thanks

Bar

Jul 21 '05 #1
3 1401
I don't think you can do that. I believe the file is parsed when the app
domain first loads and it's never actually looked at again.

You could always use an INI file or a custom XML file with your settings and
load it whenever you want. App.config is bad in any case, especially for
applications that require per-user settings (as opposed to machine-specific
ones).
--
____________________
Klaus H. Probst, MVP
http://www.vbbox.com/

"Bar Elimelech" <ba****************@hotmail.com> wrote in message
news:%2*****************@tk2msftngp13.phx.gbl...
Hi All,

I've wrote a windows service, and I'm trying to find a way to reload the
app.config <add> tags at runtime.

It looks like the dot net framework does not support it in any way.

Please replay if you know how can I do it.

Thanks

Bar


Jul 21 '05 #2
Klaus,

Thanks for you fast replay, the thing is I'm not going to change the
app.config file very often, but my main problem is to change it on the
production server and I believe everybody have to do it sometime J.

Are you sure Microsoft did not come up with a solution to this problem, I’m
sure lots of developers faced this problem before I did and it should be
very common thing.

Thanks

Bar

"Klaus H. Probst" <us*******@vbbox.com> wrote in message
news:#y*************@TK2MSFTNGP10.phx.gbl...
I don't think you can do that. I believe the file is parsed when the app
domain first loads and it's never actually looked at again.

You could always use an INI file or a custom XML file with your settings and load it whenever you want. App.config is bad in any case, especially for
applications that require per-user settings (as opposed to machine-specific ones).
--
____________________
Klaus H. Probst, MVP
http://www.vbbox.com/

"Bar Elimelech" <ba****************@hotmail.com> wrote in message
news:%2*****************@tk2msftngp13.phx.gbl...
Hi All,

I've wrote a windows service, and I'm trying to find a way to reload the
app.config <add> tags at runtime.

It looks like the dot net framework does not support it in any way.

Please replay if you know how can I do it.

Thanks

Bar



Jul 21 '05 #3
Well a Google search doesn't turn up anything interesting other than
recommendations to use something else or unload the application.
--
____________________
Klaus H. Probst, MVP
http://www.vbbox.com/

"Bar Elimelech" <ba****************@hotmail.com> wrote in message
news:un****************@tk2msftngp13.phx.gbl...
Klaus,

Thanks for you fast replay, the thing is I'm not going to change the
app.config file very often, but my main problem is to change it on the
production server and I believe everybody have to do it sometime J.

Are you sure Microsoft did not come up with a solution to this problem, I'm sure lots of developers faced this problem before I did and it should be
very common thing.

Thanks

Bar

"Klaus H. Probst" <us*******@vbbox.com> wrote in message
news:#y*************@TK2MSFTNGP10.phx.gbl...
I don't think you can do that. I believe the file is parsed when the app
domain first loads and it's never actually looked at again.

You could always use an INI file or a custom XML file with your settings

and
load it whenever you want. App.config is bad in any case, especially for
applications that require per-user settings (as opposed to

machine-specific
ones).
--
____________________
Klaus H. Probst, MVP
http://www.vbbox.com/

"Bar Elimelech" <ba****************@hotmail.com> wrote in message
news:%2*****************@tk2msftngp13.phx.gbl...
Hi All,

I've wrote a windows service, and I'm trying to find a way to reload the app.config <add> tags at runtime.

It looks like the dot net framework does not support it in any way.

Please replay if you know how can I do it.

Thanks

Bar




Jul 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Maxim Khesin | last post by:
I want to have a config file with my python proggie, satisfying the following requirements: 1) support key->(value, default) 2) simple and intuitive to read and edit 3) easyly readable into a...
4
by: Fuzzyman | last post by:
There have been a couple of config file 'systems' announced recently, that focus on building more powerful and complex configuration files. ConfigObj is a module to enable you to much more *simply*...
3
by: Richard Lewis Haggard | last post by:
I have a test application that is calling an assembly that reads some strings out of a config file. Normally, this assembly supports a web application and the information can be read just fine....
13
by: Khodr | last post by:
Hello, I am using VS.NET 2003 and vb. I build my application MyApp and it generates MyApp.exe.config. So now MyApp.exe reads parameters from MyApp.exe.config. Great and no problem! I need to...
20
by: tomerfiliba | last post by:
hey i've been seeing lots of config-file-readers for python. be it ConfigObj (http://www.voidspace.org.uk/python/configobj.html) or the like. seems like a trend to me. i came to this conclusion...
11
by: TARUN | last post by:
Hello All I need to ask about the configuration file in .NET, There are Two config File 1. Web Config 2. Machine config I understand the the usage of Web config , but not able to understand...
12
by: dbuchanan | last post by:
Hello, (Is this the proper newsgroup?) === Background === I am building a solution with two projects. One project is my data access layer which contains my DataSet as an xsd file. The XSD...
5
by: mmcd79 | last post by:
I built a VB.net application that makes use of a machine level DB connection string setting, and a user level starting location setting. The machine level setting and the default user based...
10
by: eagle | last post by:
I have a web.config in my application that contains the connection strings to all my datasources. I want to move these connection strings to another web config up the folder hierarchy so that all...
5
by: =?Utf-8?B?SmVycnkgQw==?= | last post by:
I have a app that uses several membership/role providers. I can list these Providers with the code: Dim rootWebConfig1 As Configuration rootWebConfig1 =...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.