« Previous Next »

Thread: Directory change notifications for web.config

Last post 10-15-2008 4:51 PM by Mike Ayling. 3 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (4 items)

Sort Posts:

  • 09-26-2008, 2:05 PM

    Directory change notifications for web.config

    From what I'm noticing, it looks like a running IIS7 w3wp will create a change notification for every directory that it is aware of within a site's physical hierarchy, based on incoming requests. This is most likely done to monitor for changes to web.config files. So, when the first request comes in to /app1 the server will monitor the directory for changes (regardless of existence of a web.config in that dir). Then if a request comes in to /app2 the same thing occurs. This is all well and good, but is relatively expensive in remote content over unc scenarios, especially when communication with the remote storage is done via SMB1 (think about a very active site with thousands and thousands of physical directories...)

    I'm painfully aware of how to modify lanmanserver and lanmanworkstation parameters to increase the max mpx count and all that fun stuff. However, I'm wondering if there is a way modify the server's behavior in a similar manner to what this asp .net hotfix did (specifies FCNMode):
    http://support.microsoft.com/kb/911272

    This hotfix enables the following to be configured:

    ValueBehavior
    Does not exist This is the default behavior. For each subdirectory, the application will create an object that will monitor the subdirectory.
    0 or greater than 2 This is the default behavior. For each subdirectory, the application will create an object that will monitor the subdirectory.
    1The application will disable File Change Notifications (FCNs).
    2The application will create one object to monitor the main directory. The application will use this object to monitor each subdirectory.

    Personally, I like option "2" as it consumes fewer work items to the storage infrastructure. Is it possible to modify IIS7's default behavior so the distributed configuration is less painful to implement when communicating SMB1? The only thing I know of that even relates to this is ConfigPollMilliseconds, but from what I've seen setting that value doesn't actually prevent the web server from making a NOTIFY_CHANGE call to the file server.

    Any suggestions? Thanks

    -Mike

     

  • 09-26-2008, 2:51 PM In reply to

    • jimrPA
    • Top 100 Contributor
    • Joined on 06-02-2008, 9:20 AM
    • Posts 62

    Re: Directory change notifications for web.config

    http://blogs.iis.net/ksingla/archive/2007/12/30/list-of-registry-keys-affecting-iis7-behavior.aspx Can check out the w3wp section..All I can really find as nothing is in the reference kit.
  • 09-30-2008, 12:29 PM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 10:13 PM
    • Redmond, WA
    • Posts 2,343

    Re: Directory change notifications for web.config

    The hotfix you are referring to applies to asp.net's use of file-change notification for UNC - ConfigPoolMilliSeconds applies to IIS configuration - there are other regkeys that apply to static and asp content served by IIS.

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
  • 10-15-2008, 4:51 PM In reply to

    Re: Directory change notifications for web.config

    Just to follow up on this, in case anybody else runs into this problem...

    Turns out the culprit was in fact not IIS7. It seems the ISAPI Rewrite filter that we had installed at the "global" server level was doing this. I posted on the helicontech forum about this, and while the response was somewhat vague, it confirms (along with the change I made to our production environment) that the ISAPI Rewrite filter creates a change notification on ~every~ directory it is aware of, as requests come in. Bad. Very bad...

    Here is the response I got from helicontech:
    "Here is a simple algorithm:
    1) ISAPI_Rewrite takes .htaceess file, parses it and stores the result in cache.
    2) For each request ISAPI_Rewrite uses only cached copy.
    3) If there are some file system changes, then ISAPI_Rewrite updates the cache."

Page 1 of 1 (4 items)
Microsoft Communities