Reputation: 1354
at System.IO.__Error.WinIOError(Int32errorCode, String maybeFullPath) at System.IO.File.Delete(String path)
at secure.course.ContentList.ListCourses.imgBtnExport_Click(Object sender, ImageClickEventArgs e) in secure\course\ContentList\ListCourses.aspx.cs:line 1639
above is the stack trace for the error which i am getting while Deleting a Zip file.
Upvotes: 1
Views: 383
Reputation: 15091
The process cannot access the file 'content\temp\Courses\MSOfficeExcel2007MSOE2007.Zip' because it is being used by another process
Well, it sounds like MSOfficeExcel2007MSOE2007.zip file is in use and cannot be accessed. If you are accessing it in your code, you'll want to close it before you try to delete it. If you aren't accessing it in your code, make sure you don't have another program with it open (IE - you checked the contents of the .zip file in WinZip and didn't close it)
Upvotes: 1
Reputation: 11423
Make sure you have Full control
permission on that folder.
Properties ---> Security
Upvotes: 0