While using the File.Move method to move a file from one location to other:
I was getting the following exception: Access to the path is denied. Exception Details: System.UnauthorizedAccessException: Access to the path is denied.
The fix for this was to give IIS_IUSRS account full control permissions:
After giving the permissions the issue was fixed.