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

Discussion in 'ASP .Net' started by JeffM, Feb 22, 2005.

  1. JeffM

    JeffM Guest

    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
    JeffM, Feb 22, 2005
    #1
    1. Advertising

  2. > "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.

    "JeffM" <> wrote in message
    news:...
    >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
    >
    >
    Kevin Spencer, Feb 22, 2005
    #2
    1. Advertising

  3. 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.




    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Jeff Mitchell, Feb 22, 2005
    #3
  4. 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.

    "Jeff Mitchell" <> wrote in message
    news:...
    >
    > 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.
    >
    >
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
    Kevin Spencer, Feb 22, 2005
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page