<p>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:</p>

<pre><code>string FilePath = string.Format(@"{0}\templates\MyFile.htm", Environment.CurrentDirectory);
string FilePath1 = string.Format(@"{0}\templates\MyFile.htm", System.AppDomain.CurrentDomain.BaseDirectory);
</code></pre>

<p>It was using the C:\WINNT\system32\ or the ASP.NET Temporary Folder directory.</p>

<p>What is the best to access this file without having to use an app.config or web.config file?</p>

<p>[This is using a WCF Service]</p>

You're running this from an ASP.Net app right? Use
```
Server.MapPath()
```
instead.
Also take a look at
```
System.IO.Path.Combine()
```
for concatenating paths.
[Edit]
Since you can't use
```
System.Web
```
, try this:
```
```
System.Reflection.Assembly.GetExecutingAssembly().Location
```
```
Or
```
GetEntryAssembly()
```
.