Welcome to PhoneASK, where you can ask questions and receive answers from other members of the community.

how to alter app.config File of windows Service from Front End.user Interface

asked 一月 12 at 13:00 by capsula
I have Developed a Windows Service
and a ServiceController
which shows in system Tray Icon.
which contains Sart/Stop options to Alter the state of
the Service.

Here I want to add a functionality in the menu like
setting .When user clicks the settings
a window opens to input some Time inputs
means 1 hour 2 hour or a Specific time Like 10Am or any.
when user clicks ok after enetring the value.

I want that in The App.config xml file the parameters should
pass there and changes the configuration File Accordingly.
How to achieve this.
Can this Be done
Please suggest some Idea.

Your answer

1 Answers

answered 一月 12 at 22:19 by Anna
Hi ,
Right click on your solution Choose Properties Then Settings now you can add your variable in app.config and to access this
using C#
string x = Properties.Settings.Default.Myvariable;
after you deploy your application go to set up file and modified it
Best Regards

Related Questions

I'm looking for a way to host a web UI in a windows service so that I can configure and control it within a browser. I'd like a simple and lightweight solution, and I don't want to use IIS. I could p
I have a .NET windows service and I want the user to be able to configure it with a web UI. Is is possible to serve the web UI using the windows service and not some kind of external web server like a
My company runs an old application written in delphi. A simple com server which serves some database for some computers. I have to run the server once in every computer to register the com interfaces
I have a web application that require client machine's Motherboard number and other details. I have created a windows service to get machine details (like motherboard number). I want to pass these inf
I have a service running in Windows 7. In Windows 7 all services run in Session 0. From that service I want to create an interactive user session (in a session other than Session 0) and start an appli
What's the difference between a Windows service and a standard exe?
I am writing a Silverlight class library to abstract the interface to a WCF service. The WCF service provides a centralized logging service. The Silverlight class library provides a simplified log4net
Dear Perl and XML gurus I have a task to update values inside XML file using XPath. I use XML::LibXML library in Perl to read, alter and save XML file: # Read XML file my $parser = XML::LibXML->new
How can I insert text at the beginning of a file that already exists using a command in a BAT file? Mock me if you like but my googling skills failed me :)
I'm working on a plug-in architecture for widgets on a website. I would like each individual widget to store its Javascript and CSS as resources in the assembly. When the page is rendered, I inject
I have created a console application in .Net 2.0 (C#) and want to create an installer that will install the application as a Windows Service. I have never created an installer before but I am reading
First of all I apologize if the references to this question are not correct. I am developing a three-tier MVC 3 application. In the business layer I need to create a service which will call the Data
I have a problem with an iframe on a page surrounded by a header and footer. There is a div in the header which overlaps the iframe ( in blue below ). The div with id logo looks like this: #logo { z
I have a Windows Service hosting a WCF service. If something goes really wrong in my WCF service I'd like to stop the Windows Service. I could try and force it to stop by shelling out and using net st
I'm running a multithreaded windows service that need to call a VB6 dll. There's no documentation about this VB6 dll and this legacy system supports a very critical business process. At first time (1º
My ElasticSearch mapping created curl -XPUT 'http://myhostname:9200/data/my_data/_mapping' -d ' { my_data : { properties : { empID : {type : integer}, empName : {type : string} } } }'
I am building a multi layered application. When i pass an object from my presentation layer to my business layer, i want to cast it to an interface type, because the business layer does not know of th
I have a char buf[3]; array where I need to put: buf[0] = ch where ch is an int. But the compiler give the following warning: conversion to ‘char’ from ‘int’ may alter its value How do I remove thi
In most systems, the default behaviour for open a new window is that it appears at the front. This doesn't happen in Cocoa, and I'm trying to find the correct way to make this standard behaviour.
I want to add a file/file group to an existing database, but I need to get the path from a variable because it will be different when this script is finalized. When I check the script in SQL Managemen
Is it possible to automatically generate interface units from C header files? In particular, I want to wrap the HDF5 library, and it would be great if I could avoid writing the interface unit manually
I need to read an XML file in my WCF service and return the same file as XML back from my WCF service in C#. Can someone point me to the right direction. Most samples out there seems outdated.
We have many questions itself on stackoverflow regarding uninstallation of Windows Service. After trying all of them I still fail to uninstall the windows service on new version Installation. I use se
How do I make a .groovy script into a windows service? This link http://groovy.codehaus.org/Windows+Services was not good for me, because I am using Win Serv 2008 64-bit.
I'm doing some code in C and I want my code to be able to determine whether its running as a windows service or as a normal application, AFAIK that windows services run on session 0 on windows vista,7
I am writing a DLL which may run in the context of a service and may be loaded into a standard win32 process. How can I detect whether it is running in the context of a service or in the context of a
I'm trying to run WAMP 64 bits on Windows 8.1 but it's not working ; When I launch it, the icon is orange and localhost isn't find. I've completly uninstalled Skype, tried to modify httpd.conf, hosts
I'm trying to start a Windows service on Windows Server 2003 from an ASP.NET page: the code of line 35 is: 32. Dim controller As New ServiceController 33. controller.MachineName = System.Environment.
I'm using sql server management studio 2008 to try and generate an alter script for each of my stored procedures in order to save the scripts for each revision. I can easily generate an alter script f
I'm trying to understand what is the correct why to implement COM interfaces from C# code. It is straightforward when the interface doesn't inherit from other base interface. Like this one: [ComImport
I am making an application where I would like to capture an image from the front facing camera, without presenting a capture screen of any kind. I want to take a picture completely in code without any
I can't use the getFilesDir() in an asynctask which is in a service. I saw this post: Android: Writing to a file in AsyncTask It solves the problem in an activity but i dont find a way to do this in a
I have class that will load all assemblies in a directory and then get all the types an see if they implement an interface. I cannot get the type comparison to work. In the debugger I see my type load
So, there already is a way to generate an implementation of a class in IntelliJ (v11), but it is rather simple. It will create a class with all the methods necessary to satisfy the interface. These me
Hai am trying to send list elements to the another activity through asynctask but i cant get the proper result can you please help me.. this is my asnctask : public class AsyncClass extends AsyncTask
I'm trying to remote control a live wallpaper from a widget. They're in the same APK, but obviously different processes. Calling an activity of the live wallpaper is of little use to me since it is
I'm working with C# developing app for windows mobible 6. I need get the icon of a file, but i don't know how to do that =P. Is there way to get it?
I'm writing an app that reads data from a text file and uses that as the basis of the app. This is just a simple text file with several lines of data that the program needs. I've included the text fil
I create two dialogs: DialogA: setVisible(true) called only once. DialogB: setVisible(true) and setAlwaysOnTop(true) called every 1,5 sec Windows: Each call to dialogB.setAlwaysOnTop(true) brings dial
When my Android device (Samsung galaxy s4) is connected to my laptop (Windows 7), I would like to be able to access files on the Android device from the Windows 7 command line. The commands : cd Compu
I would like to download a xml file from web, then save it to the local storage but I do not know how to do that. Please to help me clearly or give me an example. Thank you.
Unlike the asmx implementation the wcf requires for you to implement it's interface. I do not quite understand the reason behind that design. Interface is a contract between 2 classes...With that bein
How do I create an installer for a Windows Service that I have created using Visual Studio?
My goal is to create a system monitoring application using Java. I would like to know when a user is doing activity on a Windows PC. The result would be something like this: 8:00 - 8:15 activity 9:12
How to create a windows service with Rails 3 and Ruby 1.9.2 using Mongrel?
I am facing a weird issue. I have a java application which runs perfectly under proxy, but when the application is setup to run as a windows service it doesn't work. I have tried setting jvm with thes
I am calling REST service in Windows Phone 8.1, It is running in Simulator but not running on Device. I stuck here, how to deal with? See my code below: System.Net.Http.HttpClient client = new System
I'm using redmine as a ticket manager, and I'd like to configure it to be run automatically when windows starts up. How can I configure it to be run as a service? -- Just asked the question to documen
I have created an windows service. I want to open some windows based application from this service. But my windows service is unable to start desktop applications. To enable the access I had to do the
I have Jekyll blog where some posts have featured images, some posts don't. Featured images are defined in the front matter of the post like so: featured-image: http://path/to/img On the archive pag