I have an application which will copy 1000 files from One folder to another. After each file is copied we will write the Copy Success/Failure information into a separate file. At some time, during writing this copy information in a file, StreamWriter,WriteLine throws the following exception"
10/28/2014 12.21.02.068 Message : Not enough storage is available to process this command.
Filename : Copying file C:\Program Files\XYZ\SampleFile.xml to C:\Program
Files\ABC\SampleFile.xml.xml | Inner Exception : | Type : System.IO.IOException | Source : mscorlib
Not enough storage is available to process this command.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.__ConsoleStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
at System.IO.StreamWriter.Write(Char[] buffer, Int32 index, Int32 count)
at System.IO.TextWriter.WriteLine(String value)
at System.IO.TextWriter.SyncTextWriter.WriteLine(String value)
at System.Console.WriteLine(String value)
at VersionActivator.VersionActivationController.LogMessage(String message)
mscorlib : Not enough storage is available to process this command.**
But this application works fine when the PC initialized in safe mode.
Can any one please help me?
It is developed in C#.
My code is
And the m_LogWriter will be initialized at Windows_load event.