473,804 Members | 3,855 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Automatic Updating of app.config

I was hoping someone could help me out.

I have created a WindowsService that runs periodically throughout the day using a timer. This windows service looks into a Microsoft SQL database and looks at a few tables and performs a few operations. It uses a app.config file to read in some settings, such as: database connection string, time to perform its operations, etc
This all works well, however if the app.config file is changes (ex. change the time to perform actions), the windows service is not updated unless you stop the service, build and reinstall it, and then start it up again. - which isnt an option

I have not tried changing the executableName. exe.config file, since I want to be able to change the app.config file directly. I have looked around on the internet and found many people with similar problems, but have not found a good solution to the problem.

As a last resort I could read directly from the app.config file periodically, but would much rather use ConfigurationSe ttings.AppSetti ngs or something similar to that to automatically read in the values. I would rather not have the trouble of reading from the file manually, since if it is currently opened it may get complicated.
Currently when the time interval elapses and it checks which actions need to be performed, it also reads in the the config file using ConfigurationSe ttings.AppSetti ngs. However, this information may be out of date. I would like a way to update this data somehow when the app.config file is manually changed while the windows service is running.

If anyone has encountered similar problems or has any suggestions as to how I can do this please let me know

Thanks

Mike.

---
Posted using Wimdows.net NntpNews Component - Posted from .NET's Largest Community Website: http://www.dotnetjunkies.com/newsgroups/
Jul 21 '05 #1
1 1892
I decided just to create my own xml configuration file. When I looked into it, it was a lot easier to set it up than I thought. Although using the app.config file would still be my preference.

---
Posted using Wimdows.net NntpNews Component - Posted from .NET's Largest Community Website: http://www.dotnetjunkies.com/newsgroups/
Jul 21 '05 #2

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

Similar topics

5
2379
by: Shane | last post by:
I wonder if someone has any ideas about the following. I am currently producing some reports for a manufacturing company who work with metal. A finished part can contain multiple sub-parts to make up the finished part. The sub-parts can also be made up of sub-parts and those sub-parts can also be made up of sub-parts etc etc. All parts are contained within the same table and I have a seperate table
2
1876
by: Trygve Lorentzen | last post by:
Hi, I'm developing an app with automatic version checking and updating. It must also track what version is installed for each customer in our customer database. I have made a small client to fetch updated file(s) from the net and copy over the old files. I figured this must be done since the program itself will be read/write locked as long as it is running. I have a progressbar prgDownload that shows the download progress. My main...
2
1652
by: MisConFit8 | last post by:
My question is this - is it possible to set a standard value in the web.config file and change it later based on conditions? Why, you might ask? I am building a web based application for inter-office usage. It is an application where software product keys and license keys are stored and created. We have 1/2 of the office personnel working from within the domain, and 1/2 that disconnect and work in the field. I am setting up replication for...
1
2146
by: Matt | last post by:
Hi, I was wondering if anyone can tell me why dynamically updating the web.config file causes ASP.NET worker process to recycle and detroy all session states including variables. Is this a known bug or is it by design. Do we know why microsoft do not supply a method to write values to the web.config file. Thank you to anyone who can give me any clues to this problem. Regards,
1
323
by: miannone | last post by:
I was hoping someone could help me out. I have created a WindowsService that runs periodically throughout the day using a timer. This windows service looks into a Microsoft SQL database and looks at a few tables and performs a few operations. It uses a app.config file to read in some settings, such as: database connection string, time to perform its operations, etc This all works well, however if the app.config file is changes (ex. change...
5
1536
by: Joey | last post by:
Hi, I am using NFOP to generate PDF files from my web pages. The problem is that when i change the web.config, the page that is using NFOP hangs. I don't know if this is directly related to NFOP, however i would like to know if i can make a workaround to solve this. Maybe by unloading the NFOP assembly and reloading it? Can anyone help in this, please?
0
2572
by: Gauls | last post by:
Hi, I have webservice application that uses some assemblies whoes version number keeps changing and are stored in some folder on the same machine as my webservice. Every Time the assembly version changes i need to change the binding redirect and code base in the web.config file. EX : <dependentAssembly> <assemblyIdentity name="ABCD" publicKeyToken="Sometoken" culture="neutral" />
1
1281
by: DC | last post by:
Hi, before I start to program a tool from scratch I wanted to check if somebody knows an existing solution: we often have the demand to modify a certain config value in many .config (web.config and Enterprise Library config - yes we still use them) files. For example: change <pdfprod>pdf01</pdfprodto <pdfprod>pdf02</pdfprodin many web applications with different paths. It's not an xcopy scenario since the configs differ on the different...
0
922
by: RG | last post by:
I have a stored procedure which is called by db2 "call ....." statement from ksh script. When running from AIX DB2 v. 9.1.3 environment, after a while the stored procedure starts to hang and snapshot says it is on fetch statement. The job of the stored procedure is to loop through the cursor executing ddl command found in one of the columns and updating the table which is cursored. It is using handler and hold options.
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9577
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10325
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10315
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10075
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9140
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4295
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2990
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.