Scenario - I need to access an HTML template to generate a e-mail from my Business Logic Layer. It is a class library contains a sub folder that contains the file. When I tried the following code in a unit test:
string FilePath = string.Format(@"{0}\templates\MyFile.htm", Environment.CurrentDirectory);
string FilePath1 = string.Format(@"{0}\templates\MyFile.htm", System.AppDomain.CurrentDomain.BaseDirectory);
It was using the C:\WINNT\system32\ or the ASP.NET Temporary Folder directory.
What is the best to access this file without having to use an app.config or web.config file?
[This is using a WCF Service]