1

We have our sites under a main folder we'll call call "d:\sites". "d:\sites" is shared as \server1\sites with read only access for our Dev and QA groups. I added another read only group to the share permissions (not NTFS) and the site started to recompile. I wasn't sure what I had just seen, so I did it on another server and the same behavior occurred.

We use dynamic recompilation, and I can't find a reference that says this should cause a recompile to occur (ref.[1]: http://msdn.microsoft.com/en-us/library/ms366723%28v=VS.100%29.aspx)

Has anyone else seen this, or know why it is happening?

hubdows
  • 25
  • 3
  • 1
    Is the `optimizeCompilations` attribute of the [compilation element](http://msdn.microsoft.com/en-us/library/s10awwz0%28v=vs.100%29.aspx) in your Web.config file set to `true`? – Robert Harvey Oct 04 '12 at 17:29

1 Answers1

1

If permissions are inherited from the parent, then adding this new permission changes the file. This change in the state of the file is picked up by IIS as a change, so the dynamic recompile is triggered. IIS treats even permission changes as if it was a change to the code base.

Joel Etherton
  • 37,325
  • 10
  • 89
  • 104
  • Which, for clarification, is the absolute best thing for them to do. It's entirely possible that a permission change results in a previously available file to no longer be accessible by the app pool user and therefore needs a recompile to ensure the project is functional. – NotMe Oct 04 '12 at 17:31
  • I can understand that, if it's an NTFS permission change, but not for share permissions. Our app pools don't point to share names. – hubdows Oct 04 '12 at 18:20
  • 1
    @hubdows: A share permission change is no different. It "touches" the file and marks it with a change. In Windows, the user always carries with it the lowest level of access, so if you place a "deny" permission on even the share permission, this alters the usability of a file even if the user has full control assigned through the local system. This change can't be ignored so IIS doesn't ignore it. – Joel Etherton Oct 04 '12 at 18:46
  • @Joel Thank you. The way I read it from the Microsoft references below is different, but I'll accept this as the answer since I really don't know if the Microsoft reference to asp.net above is inclusive of all the causes for a recompile. [link](http://technet.microsoft.com/en-us/library/cc772184.aspx) [link](http://technet.microsoft.com/en-us/library/cc754178.aspx) – hubdows Oct 04 '12 at 19:21