windows service
-
Hi, I have created a windows service which looks at an xml file to get data. The xml file gets modified using a windows application. If the xml file is changed then the service has to be uninstalled and then installed again so that the service picks up the new xml file data, otherwise the service looks at the old xml data. Question: How can I avoid the manual interaction with the visual studios command where at present I use it to uninstall and install the service? Can I make the windows application to do the un/install everytime there is a change in the xml file? Thanks
-
Hi, I have created a windows service which looks at an xml file to get data. The xml file gets modified using a windows application. If the xml file is changed then the service has to be uninstalled and then installed again so that the service picks up the new xml file data, otherwise the service looks at the old xml data. Question: How can I avoid the manual interaction with the visual studios command where at present I use it to uninstall and install the service? Can I make the windows application to do the un/install everytime there is a change in the xml file? Thanks
Iy shouldn't be nessecary to reinstall every time the xml changes. You could add a
FileSystemWatcher
to monitor changes in the xml-file and make the service load the updated xml-file. -
Hi, I have created a windows service which looks at an xml file to get data. The xml file gets modified using a windows application. If the xml file is changed then the service has to be uninstalled and then installed again so that the service picks up the new xml file data, otherwise the service looks at the old xml data. Question: How can I avoid the manual interaction with the visual studios command where at present I use it to uninstall and install the service? Can I make the windows application to do the un/install everytime there is a change in the xml file? Thanks
Your design is wrong. You have to use a
FileSystemWatcher
, handle it's event and load the XML file when it changes.All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions