473,792 Members | 2,831 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 1890
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
2377
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
1875
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
2145
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
1535
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
1280
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
9518
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
10211
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
10159
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,...
1
7538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6776
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5436
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5560
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4111
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
2917
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.