[WebMethod]
public void UploadLogFile(byte[] buffer, string filename)
{
if (!Directory.Exists("D:\\EEMS\\EHTLog\\" + DateTime.Now.ToString("yyyyMM")))
{
Directory.CreateDirectory("D:\\EEMS\\EHTLog\\" +
DateTime.Now.ToString("yyyyMM"));
}
BinaryWriter binWriter = new
BinaryWriter(File.Open("D:\\EEMS\\EHTLog\\" +
DateTime.Now.ToString("yyyyMM") + "\\" + filename, FileMode.CreateNew,
FileAccess.ReadWrite));
binWriter.Write(buffer);
binWriter.Close();
}