Read & Write Writelog
<p>How do I write the error faced into the log.txt?</p>

<p>Firstly, I get error file name from web config as follows:</p>

<pre><code>string Errorlog = System.Configuration.ConfigurationManager.AppSettings["Errorlog.txt"];
</code></pre>

<p>Next, I try to get the  full path of the text file; but i do not know which one will pull it out. 
This is a few. I want to get the full path by not making it static.</p>

<pre><code>    //string path = Global.getLogFilePath();
    //string path = Path.GetFileName(directoryFullPath);
    //string path = openFileDialog.FileName;
    //string path = Path.Combine(System.Environment.CurrentDirectory);
    //string path = Path.GetFullPath("Errorlog.txt");
    //string path = Directory.GetCurrentDirectory();
    //string path = System.IO.Path.GetDirectoryName(System.IO.Path.GetDirectoryName());
    //string path = System.AppDomain.CurrentDomain.BaseDirectory.ToString();
    //string path = Environment.CurrentDirectory.ToString();
    //string path = System.Environment.GetEnvironmentVariable("TEMP");
    //if (!path.EndsWith("\\")) path += "\\";
</code></pre>
