简体   繁体   中英

Prevent IIS Recycling for specific change in files

I have a column in my grid view with images of a progress bar. These images are created on each render and written to my 'write' folder. However, after Microsft's patch KB3052480, IIS resets once files in the application's directory have been created, changed, or overwritten. This can be changed in IIS's settings so that it never resets on update . However this means the application would need to manually be restarted when any patch is applied (not an acceptable outcome). Is there a way to keep the setting (so that IIS still resets on updates such as changes to .dll files) but still create and write images without it resetting. I have looked around a lot but there is not much information on this particular issue. What I was thinking is- somehow stop monitoring changes to file right before the save takes place. And then resume monitoring again. How would this be done, or is there another way to prevent IIS from recycling after this specific change?

To answer your question mentioned in the comment, which I think is your real question, to prevent the app domain from recycling on file save don't put the files you are saving inside the websites' folder. Instead have it in some other path that is not part of the application.

我有点晚了,但是如果您使用的是 asp.net 框架,那么您可以将“动态”文件存储在 App_Data 中,我认为这是回收规则的一个例外。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM