开发者

file/folder is already in use, renaming,deletion problem ? c# iis

I am trying to renme a file/folder, when i try to rename a file, i got an error, file is already in use, it is just my guess that it is caused by w3wp.exe iis process? some time its says, access to the path is denied, although the file does exist, and there are no special permission, i have all the permission to copy/delete/move and everything for the file/folder. How to fix this problem.

开发者_StackOverflow中文版

the folder contains jpeg files. this happen: when i copy a file then try to rename it. this happen: when i rename a file then try to delete it. what i mean to say is that it happen when i already use a file operation then for second time it gives me this error :( this is the error: The process cannot access the file 'C:\images\audio-aif-old.png' because it is being used by another process.

file.move(source,destination);

i am using C#. iis 6, asp.net.


Directly , ans is no. But you can delete old copy and create a new copy. See this. http://www.aspnettutorials.com/tutorials/file/file-renfile-aspnet2-csharp.aspx


Some other program must relinquish the file. If you've written a program that's still running then that must be shut down. If the file is currently open for writing you must also ensure that it's been appropriately closed. Try creating another file and see if you have the same problem with that one.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜