Problem using "use temporary file while writing"

Home Page Forums BizTalk 2004 – BizTalk 2010 Problem using "use temporary file while writing"

Viewing 1 reply thread
  • Author
    Posts
    • #16454

      Hi there,

      There seems to be a problem when using the "use temporary file while writing"-flag of the FILE-adapter of BTS2006 with UNC-paths.

      I'm trying to write a file to a network drive. The error message I get, when using a static port is:

      The adapter failed to transmit message going to send port "SendPort2" with URL "\\Tblbiz01\Dynamic-Filedrop\OUT2\%MessageID%.xml". It will be retransmitted after the retry interval specified for this Send Port. Details:"The FILE send adapter cannot open file \\Tblbiz01\Dynamic-Filedrop\OUT2\{5ACF2762-0B57-467D-9354-BF841CE018F2}.xml for writing. Details: (something like) The process cannot access the file as it is being used by another process.

      I also tried using a dynamic send port. In that case, the error message is:

      A message sent to adapter "FILE" on send port "SendPort_Dynamic_out" with URI "file://\\tblbiz01\Dynamic-Filedrop\OUT1\test1_temp.xml" is suspended. Error details: The FILE send adapter cannot open file \\tblbiz01\Dynamic-Filedrop\OUT1\test1_temp.xml for writing. Details: (something like) The process cannot access the file as it is being used by another process.

      It doesn't seem to be a permission problem because everything works fine if I leave the checkbox "use temporary file while writing" unchecked.

      Also, the problem doesn't occur when I use local drives (i.e.: D:\mydir\mydoc.xml). It only happens when a UNC-path (i.e. \\myserver\mydri\mydoc.xml) is given.

      Suggestions are most welcome as I don't really want to start writing a custom adapter for this.

      Cheers,

      JB

    • #16457

      Hi JB,

      I have looked into this issue. I haven't been able to solve this issue yet as it seem like a BUG in File adapter (Not sure so far). But i can explain what’s going wrong.

      Biztalk does create a Temp file Named: "[Your complete file name].BTS-WIP"

      When it finishes writing the temp file to the specified location, it tries to rename the file to "[Your complete file name]". But unfortunately the file is already open by the existing stream and Biztalk gets the "Sharing Violation" error. Upon getting the error it deletes the "[Your complete file name].BTS-WIP" file.

      You can test this your self as well. Just remove the delete permission from the Folder where Biztalk tries to create the File. Run your process and see that the "[Your complete file name].BTS-WIP" is still there as the Biztalk process was not given permission to delete the file.

      I have been trying to resolve this issue but no luck so far. But I thought to share my findings with you, so you can look into this as well.

      Look through these:

      File Lock or Access Denied Error Message When You Save Files Over the Network
      http://support.microsoft.com/default.aspx?scid=kb;EN-US;812937

      Files on Network Shares Open Slowly or Read-Only or You Receive an Error Message
      http://support.microsoft.com/?kbid=814112

      turn off multi user editing
      http://support.microsoft.com/default.aspx?scid=kb;en-us;Q292122

      Program Opens a File As Read-Only or Returns a Sharing Violation
      http://support.microsoft.com/default.aspx?scid=kb;EN-US;328170

      Hopefully there will be any other solution without a need to create a custom adapter. Keep the post updated if you find any thing.

      Cheers

      Zia

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.