Click here to Skip to main content
15,892,927 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,
when i am trying to upload the same file multiple times in asp.net with the help of fileupload control it reurns an exception
i.e.

The process cannot access the file 'D:\myfileupload\Files\users.xlsx' because it is being used by another process.

how to resolve this error!
Thanks in advance...
Posted
Comments
Sibasisjena 8-Jan-14 6:09am    
Can you please give me the path of the file you want to upload and the path of the saved file.
JoCodes 8-Jan-14 6:37am    
Whats the code you tried?
TrushnaK 8-Jan-14 7:36am    
where you trying to upload file... database or in folder directory,

It sounds like you are saving the same files to the same place. You'll need to save each one with a different name.
 
Share this answer
 
When you are trying to upload the same file.
make sure that you have disposed all the (excel) object related to that file.

how-to-properly-clean-up-excel-interop-objects[^]
 
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