M
Mika M
Hi!
I have made quite simple Windows Service using C# 2005. I also made
Setup for it into same solution. When I run Setup, it will be installed
ok into C:\Program Files\<MyCompany>\<MyService>.
Setup is also installing self made default "settings.xml"-file into the
same directory. It contains DataTable for the service how to work, that
service is reading into DataTable-object when it is started. These
settings are not same as <MyService>.exe.config settings.
Now the problem is that Service is trying to find this
"settings.xml"-file of the C:\WINDOWS\System32 instead of C:\Program
Files\<MyCompany>\<MyService> -path, when my "settingsHandler"-class
contains declaration...
private const string FILE_PATH = "settings.xml";
....and execution fails. How can I tell to the service it should find
this file of the "Application.StartupPath" ?
I have made quite simple Windows Service using C# 2005. I also made
Setup for it into same solution. When I run Setup, it will be installed
ok into C:\Program Files\<MyCompany>\<MyService>.
Setup is also installing self made default "settings.xml"-file into the
same directory. It contains DataTable for the service how to work, that
service is reading into DataTable-object when it is started. These
settings are not same as <MyService>.exe.config settings.
Now the problem is that Service is trying to find this
"settings.xml"-file of the C:\WINDOWS\System32 instead of C:\Program
Files\<MyCompany>\<MyService> -path, when my "settingsHandler"-class
contains declaration...
private const string FILE_PATH = "settings.xml";
....and execution fails. How can I tell to the service it should find
this file of the "Application.StartupPath" ?