You wheren't closing the stream so it was keept open not releasing the file lock.
The method that accepts the filename instead of a stream does that in the backgroud I bet.
>I use this simplified version of the transformation and this avoid the file to be locked:
>
>
>loXslCompiledTransform.Transform(oApp.cHttpFat + "Temp\" + lcFile + ".xml", tcFile)
>
>
>However, I am wondering what was the difference with this command:
>
>
>loXslCompiledTransform.Transform(New XPath.XPathDocument(oApp.cHttpFat + "Temp\" + lcFile + ".xml"), Nothing, loFileStream)
>
Alexandre Palma
Senior Application Architect