I have some code and when it executes, it throws a IOException, saying that
IOException
The process cannot access the file \'filename\' because it
Had an issue while uploading an image and couldn't delete it and found a solution. gl hf
//C# .NET var image = Image.FromFile(filePath); image.Dispose(); // this removes all resources //later... File.Delete(filePath); //now works