I use the command:
System.IO.File.Delete(filePath)
to delete jpg-images from the server. Sometimes it works when running localhost, and sometime I get the error:
System.IO.IOException: The process cannot access the file <file> because it is being used by another process.
When running the script from server, i get the error all the time. (not able to delete at all.)
I an sure the file is not locked. I have "googled" the problem and read many suggestions, but I can not solve the problem.
May it be a sort of bug from Microsoft?
Can someone please give me a tips.Tom Knardahl
Go to the complete details ...