G
Guest
I created a windows service using FileSystemWatcher to moniter a folder for
file drops. The service uses FileStream and StreamReader to read and process
the file. After it is done, the file is copied to a different location and
deleted in the original folder.
If files coming in in short intervals (under sub-second) on XP OS, there is
an error occured occassionally with the follow message:
System.IO.IOException: The process cannot access the file, because it is
being used by another process.
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).
However, on W2K OS, the error could happen even with 5 sec interval between
file droppings.
I am not sure if this is a load related issue especially on the W2K box.
Any suggestions and comments would be appreciated. My environment is XP with
Framework 1.1 as Dev box and the Production Server is W2K with Framework 1.1.
Both environment has the 1.1 SP1 installed.
Thank you
file drops. The service uses FileStream and StreamReader to read and process
the file. After it is done, the file is copied to a different location and
deleted in the original folder.
If files coming in in short intervals (under sub-second) on XP OS, there is
an error occured occassionally with the follow message:
System.IO.IOException: The process cannot access the file, because it is
being used by another process.
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).
However, on W2K OS, the error could happen even with 5 sec interval between
file droppings.
I am not sure if this is a load related issue especially on the W2K box.
Any suggestions and comments would be appreciated. My environment is XP with
Framework 1.1 as Dev box and the Production Server is W2K with Framework 1.1.
Both environment has the 1.1 SP1 installed.
Thank you