3

I'm getting this error while deleting files from archive folder. I'm trying to delete the archived folders/files created by IIS Media Services using Expression Encoder 4 Pro SP2.

When I delete these file by C# code or manually I'm getting file is open in IIS Worker Process.

I tried to move this file and then delete it, set the file length to 0 using FileStream's SetLength function, but no success.

I tried THIS but it needs restart and I can not restart my machine. Restart my machine will stop my other smooth streaming videos.

My machine is Azure Virtual Machine and has limited storage. At present there are 0 bytes free and I can not start my encoding.

Can you please tell me how can I solve this problem?

Paul Floyd
  • 5,530
  • 5
  • 29
  • 43
waghekapil
  • 321
  • 1
  • 5
  • 22
  • 2
    Have you tried or is it possible at all to just recycle your apppool? If so, then that could do it. You would have to wait until the old worker process is disposed. This is dependenent on how fast it can transfer sessions, etc. to the new worker process. – Silvermind Nov 11 '13 at 14:06
  • Recycled apppool not solved my problem. – waghekapil Nov 11 '13 at 15:06
  • Then probably the files are locked by something else??? Perhaps checking with a tool what is locking your files? But it's just a guess. – Silvermind Nov 11 '13 at 16:05

4 Answers4

5

Thanks Silvermind.

Finally I solved it. But, unfortunately I restarted my virtual machine before this solution. IIS Worker Process was locking the files, which I wanted to delete. To delete these files I stopped the IIS media services publish-points from IIS and then tried to delete files and it worked!!! for me.

waghekapil
  • 321
  • 1
  • 5
  • 22
3

I am also having the same issue just restarted website and everything goes well, now I can do from what i am prevented to.

cracker
  • 4,900
  • 3
  • 23
  • 41
2

You Need not to restart your website. there is a simple solution. find the below image.

Stop the IIS image

You have to click the stop site. still its not working, click show all applications and click on stop all.

Pirate X
  • 3,023
  • 5
  • 33
  • 60
0

For .Net Core applications you need to Stop corresponding Application Pool in IIS

Sergiy Velychko
  • 457
  • 6
  • 6