I have an assembly that reads a configuration file that is in the application directory.
This assembly is used by the Windows service and the web service.
The following is done in the Windows service:
string ConfigFile = Path.Combine (AppDomain.CurrentDomain.BaseDirectory, "MyFile.config");
However, from webservice baseDirectory is the directory to the bin directory in which the configuration file is located.
So, how do I get the assembly to find the file for both the Windows service and the web service?
Thanks JD.
source
share