|
Home > Archive > BizTalk Server Applications Integration > March 2004 > FileRecv Function Race Condition
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
FileRecv Function Race Condition
|
|
| Vai2000 2004-02-25, 2:36 pm |
| 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
| |
| Nick Malik 2004-02-26, 3:35 am |
| How do you have the file open? please show your code from the preprocessor
that opens and writes the file.
--- Nick
"Vai2000" <nospam@microsoft.com> wrote in message
news:ezisV38%23DHA.3816@TK2MSFTNGP09.phx.gbl...
> 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
>
>
>
| |
| Jan Eliasen 2004-03-18, 2:00 pm |
| On Wed, 25 Feb 2004 13:38:11 -0500, "Vai2000" <nospam@microsoft.com>
wrote:
I'd like to be sure about whether the error comes from BizTalk trying
to read the file you are writing or from your preprocessor trying to
read the file BizTalk received and is sending to your preprocessor.
In the latter case, as Nick has mentioned, you need to be carefull how
you open the file, since BizTalk has a lock on it. You need to open it
with the same permissions as BizTalk did.
I have a sample-preprocessor here:
www.eliasen.dk/biztalk/bizhdapppreprocessor.zip
>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
>
>
--
Jan Eliasen, representing himself and not the company he works for.
MCP in Microsoft BizTalk Server
|
|
|
|
|