生成系统日志

时间:2016-05-11 16:56:49
【文件属性】:
文件名称:生成系统日志
文件大小:3KB
文件格式:TXT
更新时间:2016-05-11 16:56:49
生成系统日志 c#生成系统日志。 系统出错提示如下: 调用 exeQuery 接口时出现异常:System.IO.IOException: 该进程无法访问文件“e:\syslog\sells_log\att_log\2005\10\7\Att_log_2005_10_7_15.txt”,因为该文件正由另一进程使用。 at System.IO.__Error.WinIOError(Int32 errorCode, String str) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize) at System.IO.StreamWriter.CreateFile(String path, Boolean append) at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize) at System.IO.StreamWriter..ctor(String path, Boolean append) at System.IO.File.AppendText(String path) at attGateWay.AttAppend.CreateSqlLog(String Description, String Content) at attGateWay.AttOp.exeQuery(String fromStrIn, String whereStrIn, Int32 SearchType, Boolean IsGetCount, String strRelation, Boolean IsCache, String gh, Int32& ResultCount) 请问此问题如何解决?我在代码中,将StreamWriter对象Close了呀。谢谢!

网友评论