Click here to Skip to main content
15,893,190 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to upload a file in asp.net.my File is image . If the file already exist then I have to remove existing image and upload the new image. But if I try to Update existing file, it shows an error that "The process cannot access the file because it is being used by another process".









thanks...........
Posted
Comments
OriginalGriff 30-Oct-12 3:56am    
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
What are you doing with the image files? Are you displaying them on your website before the upload? If so, how?
Use the "Improve question" widget to edit your question and provide better information.

I think you have opened the image file and trying to update the same one. In that case it will show this type of error. Once close the image files which are opened and try again.
 
Share this answer
 
Hi,

Please show your code here.
May be the problem due to not disposing the objects.
After delete the file object is going to dispose?
If not then dispose the object after delete the file.
May be it will solve the error.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900