public void WriteToWebLogFile(StringWriter sw)
{
using(StreamWriter stw = new StreamWriter(System.Web.HttpContext.Current.Server.MapPath("error.txt"), true))
try
{
stw.WriteLine(sw.ToString());
}
catch(Exception Ex)
{
System.Web.HttpContext.Current.Response.Write(Ex.ToString());
}
}