Recently we were working on a case and would like to share the steps that we took to achieve it.
--We had multiple Virtual directories hosted under one site . All of the Virtual directories pointing to same central Directory as their physical path hence sharing the same web.config file .
--we wanted to disable IIS output caching for one VD alone. So basically changes made to one VD should not affect the other.
What does Output caching do? IIS automatically caches static content (such as HTML pages, images, and style sheets), since these types of content do not change from request to request. IIS also detects changes to the files when you make updates, and IIS flushes the cache as needed.
--When we were doing it at Virtual Directory level, it was affecting other VDs as well which is expected as they were sharing same web.config file.
So we performed the below steps:
<location path="testing/VD3" overrideMode="Deny">
<system.webServer>
<caching enabled="false" />
</system.webServer>
</location>
<location path="testing/VD1" overrideMode="Deny">
<system.webServer>
<caching enabled="true" />
</system.webServer>
</location>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.