mardi 31 mars 2015

Using a Winforms App to Configure a Windows Service

I have a single project made up of a Winform and a Windows Service. When installed, they both exist in the same, common folder, c:\program files\


I would like for the Winform to be able to set settings such as connection strings, passwords, logfile paths, etc. in a common xml file that both applications share. i will handle all of the encryption and decryption so that is not my issue.


The issue seems to be that when the application is installed, the Winform is unable to update the file and I get an access denied error although I am a COMPLETE domain admin with absolute rights over the desktop.


The question is, how does one go about allowing a Winform to define a common connection string between both the Winform application and the Windows service it wishes to configure?


I do NOT want to rely on the machine.config and want my own XML file that will hold all of the configuration options. There must be something simple I'm missing, a simple solution?


Aucun commentaire:

Enregistrer un commentaire