Sunday, September 17, 2017

iis 7.5 - Can you prevent IIS7/8 from monitoring UNC paths for web.config changes?




I have a web server which loads imagery from UNC filesystems for each site. These are added as a virtual directory for each site. These filesystems can contain thousands of folders and it appears that IIS is monitoring each folder for changes, which means the server eventually runs out of file handles for the UNC filesystem. I've increased the number, but this only puts off the issue. Is there a way of telling IIS not to monitor for changes on UNC filesystems?



I've looked at EnableChangeNotificationForUNC but there isn't an ASP entry under HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\ on the machine so I assume this is out of date.


Answer



For virtual directories there is the allowSubDirConfig property which defaults to true. This controls whether sub directories are checked for web.config files. Set the default to false or set it on a per virtual directory basis. Both are in the ApplicationHost.config file.






References:





No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...