This falls under the “another W2K3 butt-kicking” category as well as “looking at the process and not the error to resolve the error.”
I was trying to save a file to a W2K3 directory and kept getting the error below, telling me I could not write to the c:\inetpub\uploads\docs folder. Or so I thought...
Access to the path "C:\Inetpub\uploads\Docs\003006000019.txt" is denied.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.UnauthorizedAccessException: Access to the path "C:\Inetpub\uploaded\Documents\003006000019.txt" is denied.
Complete error page is here.
I went through my entire trickbag of IIS_WPG, Local System Policy updates on the Application Pool identity, ensuring NETWORK SERVICES and the app pool identity had write access to the folder, spinning my wheels.
Then I looked again at the stack trace.
System.IO.File.Move(String sourceFileName, String destFileName) +305
Wait a minute. If the code is MOVING a file, then write/modify permissions are required on the SOURCE directory. The permissions problem was on the SOURCE directory, yet the IIS error was telling me the permissions problem was on the DESTINATION directory.
The IIS error pointing to the destination was curiously incorrect, but I should have thought about the process generating the error rather than the IIS error itself to more quickly resolve the problem.