System.UnauthorizedAccessException: Access to the path is denied

asp.net

No matter what I do such as give Network Service and the ASP.NET account full rights to the folder that contains the image, I am still getting this error for a System.IO.File.Move. Anyone know what other accounts I may be missing here? Network Service is the account running the app pool under which this site runs on and I gave Network Service full rights to the entire folder.

I've tried everything. I gave Network Service and the machinename\aspnet full permissions to the folder that contains this .jpg. I'm testing this code and this move on localhost…my developer machine.

Best Answer

Have you tried using SysInternals FileMon now part of Process Monitor. You can use it to watch for the file access events or the access denied event.