System.IO.IOException: because it is being used by another proces



When i was trying to recursively delete a directory:

Directory.Delete(mydirectory,true);

It threw the following exception for a lot of files:

System.IO.IOException: The process cannot access the file "abc.xsl" because
it is being used by another process.

Upon further examincation, it is found that these files are all zero-byte
empty files.

Someone suggested that it might be caused by aggressive AV programs, so i
disabled AV on the box and retried, but still got the same errors.

Any clue on what might be the problem? It is running .NET 1.1 on Windows
2003 standard edition.

Thanks!

.



Relevant Pages

  • Re: Tasty exceptions
    ... I should have mentioned that this is an in-house app with about 30 users. ... The clue came when I was done with a PCAnywhere session on the db server and ... least you should be logging the exception somewhere so it can be ...
    (borland.public.delphi.non-technical)
  • Re: When to create your own exception class?
    ... exact I can (sometimes there is nothing more to tell him but a "An error has ... exception as well as the inner exception. ... I also create a .log file where I dump the error too. ... I agree with you that in general the user has no clue of what caused the ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: [PHP] Exception thrown without a stack frame
    ... I have set an exception handler to dump these so-called uncaught ... load or use APC as to whether these uncaught exceptions occur. ... This is because new DateTime will throw an exception ... Maybe there's a clue for you in there? ...
    (php.general)
  • Re: [PHP] Exception thrown without a stack frame
    ... I have set an exception handler to dump these so-called uncaught ... load or use APC as to whether these uncaught exceptions occur. ... This is because new DateTime will throw an exception ... Maybe there's a clue for you in there? ...
    (php.general)