I want to catch
exceptions in a log file. I want to name my log file by date. If the
file exists, it should append to it, if file does not exist, it should
create one. I tried the following code but get error access to path is
denied. I have shared the logs folder and given full control to every
one. Please suggest what needs to be done.
I am getting the correct FileName as 11-11-2010.txt and Fullname (with path) as \\myserver\Projects\Results\Logs\11-11-2010.txt
Error: Access to the path '\\myserver\Projects\Results\Logs\11-11-2010.txt' is denied.
Thank Youpublic void WriteLog(string TextStr)
{
string FilePath = ConfigurationManager.AppSettings["LogPath"].ToString();
//Set Filename By Date
string FileName = DateTime.Now.ToString("MM-dd-yyyy") + ".txt";
string FullName = FilePath + Fil ...
Go to the complete details ...