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

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?
 
R

Richard T. Edwards

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top