Error Deleting a File: In use

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have created a temporary file on the c: drive. I needed to do this in order to create a MemoryStream object which requires a File

But I wish to clean up and when I try in code to delete the file, .net won't let me. The only way I know how to delete the file is to stop IIS, delet the temp file and restart iis

Can anyone assist

Thank

Mik
 
Are you closing the file?

Mike said:
I have created a temporary file on the c: drive. I needed to do this in
order to create a MemoryStream object which requires a File.
But I wish to clean up and when I try in code to delete the file, .net
won't let me. The only way I know how to delete the file is to stop IIS,
delet the temp file and restart iis.
 

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

Back
Top