Receive Function Race Condition

From: Vai2000 (nospam_at_microsoft.com)
Date: 02/25/04


Date: Wed, 25 Feb 2004 13:35:41 -0500

Hi All, I have a preprocessor which is writing a file to a shared path which
is monitored by a File Receive Function. Problem is I am getting this error
seldomly.

Source: mscorlib
Message: The process cannot access the file foo..txt" because it is being
used by another process.
Stack Trace:
   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)

TIA



Relevant Pages

  • Re: UnauthorizedAccessException: Cant write to file, but I can read i
    ... > FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean ... > bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, ... > FileAccess access, FileShare share) at System.Xml.XmlDocument.Save(String ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: File IO Error!!!
    ... > at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess ... > access, FileShare share, Int32 bufferSize, Boolean useAsync, String ...
    (microsoft.public.dotnet.languages.csharp)
  • FileReceive Function RACING!!!!
    ... at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess ... access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, ...
    (microsoft.public.biztalk.general)
  • Why cant I access a file in Network driver from Windows Service?
    ... at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess ... access, FileShare share, Int32 bufferSize, Boolean useAsync, String ...
    (microsoft.public.dotnet.languages.csharp)
  • Why cant access a file under network drive from Windows Service?
    ... at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess ... access, FileShare share, Int32 bufferSize, Boolean useAsync, String ...
    (microsoft.public.dotnet.languages.csharp)

Loading