生成系统日志
c#生成系统日志。系统出错提示如下:调用exeQuery接口时出现异常:System.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) attGateWay.AttAppend.CreateSqlLog(String Description, String Content) attGateWay.AttOp.exeQuery(String fromStrIn, String whereStrIn, Int32 SearchType, Boolean IsGetCount, String strRelation, Boolean IsCache, String gh, Int32& ResultCount)请问此问题如何解决?我在代码中,将StreamWriter对象Close了呀。谢谢!
3.19KB
文件大小:
评论区