473,511 Members | 15,364 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\Application Data" etc. but cannot locate any such instance. What's going on here?

Thanks in advance.
Sep 4 '09 #1
2 4028
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
2988
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...
2
3558
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...
15
3468
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...
1
1716
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...
5
1619
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
4472
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...
0
1605
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...
0
1300
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...
2
2531
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. ...
0
7418
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...
0
7508
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...
0
5662
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,...
1
5063
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...
0
3222
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...
0
3212
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1572
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 ...
1
781
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
446
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...

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.