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

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.

<virtualDirectory path="/Pic777" physicalPath="\\Serv4\images\777" allowSubDirConfig="false" />

References:

  • AllowSubDirConfig Clarification (blog entry).
  • IIS7’s performance slower than IIS6 (blog entry).