File is locked by a process/program

Discussion in 'ASP .Net' started by Felipe, Aug 11, 2006.

  1. Felipe

    Felipe Guest

    Hello again
    I run a script from server side that opens a file.
    When ahoter user run the same application, the system fails because this
    file is alredy open.
    How can avoid this error?
    "This files is already open, try again" or another message error intead?

    Thanks
    Felipe, Aug 11, 2006
    #1
    1. Advertising

  2. Hi,

    Felipe wrote:
    > Hello again
    > I run a script from server side that opens a file.
    > When ahoter user run the same application, the system fails because this
    > file is alredy open.
    > How can avoid this error?
    > "This files is already open, try again" or another message error intead?
    >
    > Thanks


    Hard to say without seeing how you handle the file. Make sure that
    streams are closed after you're done with the file. Also, if you use the
    Bitmap class to load an image, I found out that you must absolutely use
    the Dispose method when you're finished, or else the image file remains
    open.

    HTH,
    Laurent
    --
    Laurent Bugnion, GalaSoft
    Software engineering: http://www.galasoft-LB.ch
    PhotoAlbum: http://www.galasoft-LB.ch/pictures
    Support children in Calcutta: http://www.calcutta-espoir.ch
    Laurent Bugnion, Aug 11, 2006
    #2
    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.
Similar Threads
  1. Mark Kamoski
    Replies:
    1
    Views:
    2,450
  2. Keith
    Replies:
    0
    Views:
    527
    Keith
    Oct 1, 2003
  3. CinnamonDonkey
    Replies:
    10
    Views:
    2,231
    Tim Golden
    May 15, 2009
  4. Keith
    Replies:
    2
    Views:
    155
    Keith
    Oct 2, 2003
  5. TF
    Replies:
    10
    Views:
    266
Loading...

Share This Page