I
Iain
I've a winforms app which writes files to another machine (through a UNC
path). The other machine does something clever with it and then writes a
result file to let me know that it has done.
I start by creating a folder then write my files in it and when I see the
'done' file I delete the folder.
I get an error on the delete claiming that another process has the file
(directory) open.
All the files IN the directory get deleted.
If I create several such directories on the trot it seems only the last one
that refuses to be deleted.
Once I shut my program down (and close VS2003) I still cannot delete it.
I cannot delete it from my local machine (same error), but if I go to the
remote machine I can delete it there.
Process Explorer from sysinternals cannot find anything locking it on either
machine.
I suspect this is a Windows issue not winforms per se except I have written
near as damnit the same program in VB and it does not do this.
Can anyone suggest how I can diagnose this?
Iain
Oh - I run GC.Collect after writing my files - this uses a com object and
I've had issues with these holding onto resources if they are not explicitly
cleaned up.
path). The other machine does something clever with it and then writes a
result file to let me know that it has done.
I start by creating a folder then write my files in it and when I see the
'done' file I delete the folder.
I get an error on the delete claiming that another process has the file
(directory) open.
All the files IN the directory get deleted.
If I create several such directories on the trot it seems only the last one
that refuses to be deleted.
Once I shut my program down (and close VS2003) I still cannot delete it.
I cannot delete it from my local machine (same error), but if I go to the
remote machine I can delete it there.
Process Explorer from sysinternals cannot find anything locking it on either
machine.
I suspect this is a Windows issue not winforms per se except I have written
near as damnit the same program in VB and it does not do this.
Can anyone suggest how I can diagnose this?
Iain
Oh - I run GC.Collect after writing my files - this uses a com object and
I've had issues with these holding onto resources if they are not explicitly
cleaned up.