Author: husna_ | Posted on: 10/11/2009 7:27:26 PM | Views : 231

How do I write the error faced into the log.txt?
Firstly, I get error file name from web config as follows:

string Errorlog = System.Configuration.ConfigurationManager.AppSettings["Errorlog.txt"];
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.


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

Go to the complete details ...