Symptoms
On a computer that is running Microsoft .NET Framework 1.1, when you use the StreamWriter.Flush() method or the StreamWriter.Close() method to access a file on a disk that has insufficient space, you receive the following exception error message:

System.IO.IOException: There is not enough space on the disk.After you free up space on the disk and then try to access the file again, you receive the following exception error message:

System.IO.IOException: The process cannot access the file “C:\outputTest.txt” because it is being used by another process.
Resolution
This problem occurs if the common language runtime (CLR) does not close the file handle after you receive the first exception error message. If the file handle does not close, you cannot access the file regardless of how much space is on the disk.