I am experimenting with the Personal Site Starter kit and for the life of me am not able to figure out the problem in what I am trying to do. The site allows the Administrator of the site, in this case me, to upload files from a folder within the root directory. This folder is called "Upload". It was all fine and dandy until I tried to delete the files after uploading. Here's the code that uploads and eventually tries to delete the files using DirectoryInfo. I get the error:
The process cannot access the file 'Handler3.jpg' because it is being used by another process.
I can't even delete these files manually. The "another" process is aspnet_wp.exe because when I kill the process on the server, I can delete the files and folders manually. The "using" was not in there initially but I added it thinking that that might be the problem but even that does not help.
Code:
Go to the complete details ...