|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Delete file error: file in use by another process
<i><b>Originally posted by : Rod McAuley (rodm@rpcorp.com)</b></i><br /><br />In windows 2000 advanced server after a file is uploaded from an asp.net form it cannot be deleted for several minutes. When an attempt is made to delete the file is responds by saying the file is in use by another process. There are no other programs (that I know of) using that file. After 5 or 10 minutes the file may be deleted. Does anyone know what is going on and how I can delete the file immediately after is uploaded.
|
|
#2
|
|||
|
|||
|
Ever find an answer?
I am having the same issue. Did you ever get your problem resolved?
Please let me know,,, if I find anything I will let you know too. Thanks, Brian |
|
#3
|
|||
|
|||
|
I'm having this same problem in ASP.NET; I am creating a file on the server and later would like to modify or delete and cannot access it. So this is not limited to uploaded files.
I suspect that the ASP runtime is not releasing File resources so they can be garbage collected. Even if you set the handle to the file to Nothing, it still takes a few minutes before you can get delete or write noappend access to the file. Is there a call, like in Java, where you tell the system to garbage collect the dereferenced objects? Or other solution? Thanks, -Martin |
|
#4
|
|||
|
|||
|
Same problem with ASP, but only on one of 2 servers...
I am having the same problem, and by accident discovered that make making a change to the global.asa file frees up the file and allows it to be overwritten, which stronly suggests that it has something to do with IIS. To make matters worse, I don't have this problem on my development server, only on a staging server, so it's become more difficult to troubleshoot. I've gone over permissions, IIS settings at least a dozen time, and just cannot find a cause... did anyone figure this out?
|
|
#5
|
|||
|
|||
|
The fix actually involves using a different code block. Instead of using the file and directory objects, use the fileinfo and directoryinfo objects.
A sample of the code follows: ************** dim fi as fileinfo fi = new fileinfo(PathToFile) if fi.exsists then fi.delete() end if ************** Let me know if this works for you. I have been using it lately and have not ran into this issue. |
![]() |
| Viewing: ASP Free Forums > System Administration > Microsoft IIS > Delete file error: file in use by another process |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|