File.Move vs (File.Copy and File.Delete)

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

We had an application running on a server that had been working for
months with no problem.

Last night, without any known change to the server, it started to
fail.

We tried all kinds of permission checking... even running the app as a
domain admin, but we kept getting the UnauthorizedAccessException
error during a File.Move operation, saying that the path to the
destination file was denied.


I changed the File.Move to File.Copy followed by File.Delete, and
everything is working fine.


What is the difference between File.Move and File.Copy + File.Delete?

Does anyone out there have any idea on this issue?
 
Might be nice if you elaborated on when and where the failing call is being
made. Like right after a dtabase close event or inside a class.

Snippet of code would be helpfull too. Otherwise, we'de be speculating over
the true cause.
 
Back
Top