The process cannot access the file because it is being used by another process

P

Ponnurangam

Hi,

I have a Web page that displays an image.

The image has three buttons at the bottom.

I have to delete the image on clicking of one of the button.

But when I try to delete the image in my code, I am getting the following
exception

Sytem.IO: The process cannot access the file because the file is being is
used be another process

Any help would be appreciated

Thanks

Ponnurangam
 
K

Kevin Spencer

When you open a file, it is locked. When you close it, it is unlocked. If an
app opens a file and doesn't close it, well, you know the result. You
probably need to (1) Shut down Visual Studio and restart it, and (2) Find
where you're not closing a file in your code and fix it.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,154
Members
46,702
Latest member
LukasConde

Latest Threads

Top