VB .Net Windows Service

  • Thread starter Thread starter Kenneth H. Young
  • Start date Start date
K

Kenneth H. Young

What is the proper way to open a form to read and write to the
app.config xml file in a Windows service since services are not intended to
have any GUI feed back? I have a Windows service programed that I would
like to now make more fuctional on any given server.


Thanks

Kenny Young
 
Why not just create another application to manage the settings in the file?

You would of course have to manually read and write the xml.
 
Kenneth H. Young said:
What is the proper way to open a form to read and write to the
app.config xml file in a Windows service since services are not intended
to have any GUI feed back? I have a Windows service programed that I
would like to now make more fuctional on any given server.

It's better to separate the UI from the service. You can use techniques
like remoting, sockets, ... to exchange data with the service.

<URL:http://groups.google.de/group/microsoft.public.dotnet.framework.windowsforms/msg/0623992bffb04993>
 
Kenneth H. Young said:
What is the proper way to open a form to read and write to the
app.config xml file in a Windows service since services are not intended to
have any GUI feed back?

You don't need a Form just to access values in App.Config.
The same code will work perfectly well in a Service. However ...

App.Config is /not/ intended for storing anything that wasn't put
there by the /compilation/ process - it's not a local "ini" file that
you can just drop things into as your program is running.

1) Create you own [xml] file to hold the options and read/write
/that/ to your heart's content.
2) Write a separate WinForms application to maintain this file,
/and/ have the Service "keep an eye" on the file, so that it can
reload the values within it if and when the file gets changed.

HTH,
Phill W.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top