waghekapil
waghekapil

Reputation: 321

Error deleting file in IIS

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?

Upvotes: 3

Views: 15172

Answers (4)

Sergiy Velychko
Sergiy Velychko

Reputation: 637

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

Upvotes: 0

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.

Upvotes: 2

cracker
cracker

Reputation: 4906

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

Upvotes: 3

waghekapil
waghekapil

Reputation: 321

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.

Upvotes: 5

Related Questions