Error.. "The process cannot access the file...

J

JeffM

I have a .dat file on a remote server that seems to be locked. I have tried
to FTP to it and delete it, rename it, copy over it and I get the error.
"Could not copy temporary files to the output directory"

Anybody have any idea why this file is locked? What do I have to do to
release it? TIA ~jeff
 
K

Kevin Spencer

"Could not copy temporary files to the output directory"

Does not indicate that a file is locked. However, your description of the
problem is inadequate as it stands to answer further. Perhaps you could
elaborate. For example, HOW did you "tried to FTP to it..." etc.? Pretend we
know nothing about what your app is doing. We don't.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 
J

Jeff Mitchell

I am very much a newbie to ASP programming. I am working on a project
that I retrieved from a Murach study guide.



The application works fine on my own local server under IIS. I have
attempted to copy it to an external server to test its functionallity
remotely. I used ws_FTPPro as an agent to transfer the application to
my remote site. The application uses a filestream to open a file of type
..dat . The first time I tried to access this file I received an error
message;



Unable to read beyond the end of the stream.

Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.



Exception Details: System.IO.EndOfStreamException: Unable to read beyond
the end of the stream.



Source Error:



An unhandled exception was generated during the execution of the current
web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.



Stack Trace:





[EndOfStreamException: Unable to read beyond the end of the stream.]

System.IO.__Error.EndOfFile() +48

System.IO.BinaryReader.FillBuffer(Int32 numBytes) +99

System.IO.BinaryReader.ReadDecimal() +20

HalloweenStore.ProductIO.GetProducts()

HalloweenStore.Order.GetProducts()

HalloweenStore.Order.Page_Load(Object sender, EventArgs e)

System.Web.UI.Control.OnLoad(EventArgs e) +67

System.Web.UI.Control.LoadRecursive() +35

System.Web.UI.Page.ProcessRequestMain() +750





I am not sure but I might have copied the file that it is attempting to
open as an ascii type. I FTP'ed back to the remote site and tried to
transfer the file from my local directory to the remote directory and
that is when I receive the error;



550 Catagories.dat: The process cannot access the file because it is
being used by another process. ! Delete of Categories.dat failed.
 
K

Kevin Spencer

The exception indicates that your app is attempting to read past the end of
the file stream. If this exception occurred, and you didn't use a "finally"
block to close the stream, that could ostensibly cause the file to remain
opened/locked.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top