Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > File is locked by a process/program

Reply
Thread Tools

File is locked by a process/program

 
 
Felipe
Guest
Posts: n/a
 
      08-11-2006
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


 
Reply With Quote
 
 
 
 
Laurent Bugnion
Guest
Posts: n/a
 
      08-11-2006
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
database file locked by aspx hkappleorange ASP .Net 4 11-08-2005 05:33 PM
File locked by another process when cached with CacheDependency Keith ASP .Net 0 10-01-2003 09:29 PM
ldb file locked by aspnet_wp.exe MrB ASP .Net 1 09-15-2003 04:22 PM
A failure occurred writing to the resources file. Access is denied. -- RESX file is locked? -- WHY? Mark Kamoski ASP .Net 1 07-04-2003 12:02 PM



Advertisments