473,785 Members | 2,421 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Saving application settings in Windows Service

1 New Member
Hi,

I'm working on a Windows Service (C#) and have added a few Application scope settings in it. Since application-scoped setting are read-only, I have manually added "set" functions for each of them in the designer-generated code. Now I can assign value to these settings at run-time and call the Save function without any exceptions, but this doesn't actually save them to the disk file. Whenever my service restarts, i find that it is still using the old values. I have even run a global file search to find if there's a hidden version of "MyService.exe. config" somewhere in C:\Documents and Settings\Applic ation Data" etc. but cannot locate any such instance. What's going on here?

Thanks in advance.
Sep 4 '09 #1
2 4042
fastestindian
74 New Member
My friend,
When u change the values of these settings at run-time values get stores to the memory but as soon as u r application closes it looses its memory and so does the values.

u need to use config file for contain those values. Try to save values to the .xml file and read those values again.

Thanks and best of luck...
Sep 10 '09 #2
PRR
750 Recognized Expert Contributor
Could you post some code? What account are you running the code (windows service). Have you tried testing your code (business code) in a console program?
Sep 10 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
3036
by: DH | last post by:
I hope this is a right place to post my question I'm working on a Windows service application with VB.net. The purpose is to let the service application as a monitor to periodically check a launching flag file. If the flag was found the service will trigger to run a finance calculating program (VMPE4SRVAPP.exe, a VB 6.0/Access application but without windows interface). I added a Process and two Timers on the Service to do checking and...
2
3582
by: Juan Manuel Alegría B. | last post by:
Hi group I have been making a windows service to execute an external application. I use a timer control, I can execute the application but does't appear as a normal windows, just I see it in the windows task manager as a local service. I think it must appear as a normal process. Someone knows about it or has any idea? Juan Manuel Alegria B. Jalisco, México.
15
3484
by: Untitled | last post by:
I have an ASP .NET web application that displays information. At the same time, i have a web service that collects information from various client applications. This data needs to be processed continuously in many ways and stored in the database. I need timers to poll the data and process on it and write to the database. I need to have lots of data cached as objects in memory as it is being used all the times. I need to generate weekly...
1
1729
by: Rajeev Ramanujan | last post by:
Hi All, I'm trying to execute a standalone application written in VB .Net using a windows service developed using VB .Net. But the service is not able to execute the application. How to make the application execute from the Windows Service that i wrote? I tried using the SHELL command to execute the application from the service as shown below.
5
1636
by: Cleyton | last post by:
Hi! I would like to know if is it possible start an application through WINDOWS SERVICE using System.Diagnostics.Process.Start()? I've tried to do this but nothing happens. Tks!
2
4507
by: asadikhan | last post by:
I have written a console application that clears out some folders. I want this application to run as a Windows Service (not a scheduled task). What is the easiest way to convert this console application into a Windows Service using Visual Studio .Net? Asad
0
1623
by: =?Utf-8?B?U3RldmUgTWFydGlu?= | last post by:
I am attempting to launch a console application from a service under a different set of credentials running on Windows Server 2003. I am getting an error "0xC06D007E: Module not found." from the called executable. In event viewer I am seeing a two entries of below separated by 2 seconds: Event Type: Failure Audit Event Source: Security Event Category: Privilege Use
0
1320
by: sus124 | last post by:
Hello, I have a console application that I built for a filesystemwatcher in C#. I have to now convert it to a windows service. Since Express edition doesn't have an inbuilt template for windows service application, I created one and exported the template. Now, that I have the template and the console application, how do I convert it to a service?Can anyone help me out in this regard? Any help would be appreciated. Thanks in advance, sus124
2
2547
by: skumardss | last post by:
Hi Techees... We have a Windows C# Application (Business Layer) which does communicate between the User Interface Layer and Data Layer. We need to convert this application to a Windows Service. We tried creating Windows Service Application in .NET framework and refered the dll of the Business Layer and then invoked the main method of the Busines Layer within the OnStart event of the Service Application. Once after doing this we were able...
0
9645
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
9480
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
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9950
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
8972
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...
1
7499
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
5381
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...
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2879
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.